Skip to content

Instantly share code, notes, and snippets.

-8 -V -T "ARTIST=%artist%" -T "TITLE=%title%" -T "ALBUM=%albumtitle%" -T "DATE=%year%" -T "TRACKNUMBER=%tracknr%" -T "GENRE=%genre%" -T "PERFORMER=%albuminterpret%" -T "COMPOSER=%composer%" %haslyrics%"tag-from-file=LYRICS="%lyricsfile%"%haslyrics% -T "ALBUMARTIST=%albumartist%" -T "DISCNUMBER=%cdnumber%" -T "TOTALDISCS=%totalcds%" -T "TOTALTRACKS=%numtracks%" -T "COMMENT=%comment%" %source% -o %dest%
@gerrymcdonnell
gerrymcdonnell / docker-compose.yml
Last active July 14, 2022 11:30
docker simple php apache
services:
php:
image: php:7.4-apache
container_name: mycakeapp-webserver1
ports:
- 8080:80
volumes:
- ./:/var/www/html/
@gerrymcdonnell
gerrymcdonnell / gist:79f502522b744fae0aece2945612439f
Created November 7, 2021 15:18
cakephp3 index method pagnate by users role
public function index(){
$user_id=$this->Auth->user('id');
$role=$this->Auth->user('role');
//check users role and show all questions if admin or just their questions of normal user
if($role=='admin'){
//show all questions
$this->paginate = [
@gerrymcdonnell
gerrymcdonnell / docker-compose.yml
Last active July 12, 2022 17:22
Mysql,Phpadmin,PHP,webserver for cakephp apps
version: "3.1"
services:
php-fpm:
image: webdevops/php-nginx:7.4
container_name: mycakeapp-webserver
working_dir: /app
volumes:
- ./:/app
environment:
- WEB_DOCUMENT_ROOT=/app/webroot
@gerrymcdonnell
gerrymcdonnell / gist:b65738ab03bf021814742b66d4f1ffcb
Created August 27, 2021 09:01
react native simple button press
import { StatusBar } from 'expo-status-bar';
import React, {State,Component } from 'react';
import { Button,StyleSheet, Text, View } from 'react-native';
const HelloWorldApp = () => {
return (
<View
style={{
flex: 1,
@gerrymcdonnell
gerrymcdonnell / MyComponentName.js
Created October 19, 2019 19:37
React native fucntional component template
import React from 'react';
import { StyleSheet, Text, View } from 'react-native';
const MyComponentName=props=>{
return(
//put component stuff here
<View>
</View>
)
@gerrymcdonnell
gerrymcdonnell / something.jsx
Created March 19, 2019 11:53
react firebase env config variables
const config = {
apiKey: process.env.REACT_APP_API_KEY,
authDomain: process.env.REACT_APP_AUTH_DOMAIN,
databaseURL: process.env.REACT_APP_DATABASE_URL,
projectId: process.env.REACT_APP_PROJECT_ID,
storageBucket: process.env.REACT_APP_STORAGE_BUCKET,
messagingSenderId: process.env.REACT_APP_MESSAGING_SENDER_ID,
};
/*create a .env eg ".env.development"
@gerrymcdonnell
gerrymcdonnell / gist:68663fc4c671354dbdab667709588a71
Created March 5, 2018 18:41
Python script to detect corrupt Images/jpg Files
__author__ = 'gerry'
#verify if an image is corrupt or not
#help from https://stackoverflow.com/questions/3964681/find-all-files-in-a-directory-with-extension-txt-in-python
img_dir="c://temp//myimages/"
corrupt_img_dir="c://temp//myimages//corruptimages//"
good_img_dir="c://temp//myimages///goodimages//"
from PIL import Image
@gerrymcdonnell
gerrymcdonnell / myvue.vue
Created February 24, 2018 15:12
blank VueJS template
<template>
</template>
<script>
export default {
}
</script>
@gerrymcdonnell
gerrymcdonnell / 2017_07_14_101820_create_roles_table.php
Created February 11, 2018 15:21
Laravel-migration with multiple record insertion
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateRolesTable extends Migration
{
/**
* Run the migrations.