Skip to content

Instantly share code, notes, and snippets.

<?php
/**
* Description of VideoStream
*
* @author Rana
* @link http://codesamplez.com/programming/php-html5-video-streaming-tutorial
*/
class VideoStream
{
private $path = "";
@ganey
ganey / App_Http_VideoStream.php
Created December 15, 2019 15:28 — forked from vluzrmos/App_Http_VideoStream.php
Laravel VideoStream.
<?php
namespace App\Http;
/**
* Description of VideoStream
*
* @author Rana
* @link https://gist.github.com/vluzrmos/d5682ad426525196d069
*/
@ganey
ganey / showAllFiles.sh
Created June 21, 2019 09:11
mac show all files/folders and dotFiles
#!/bin/sh
#after running this, hold alt/option and relaunch finder
defaults write com.apple.finder AppleShowAllFiles YES
@ganey
ganey / workspace.sh
Last active January 22, 2019 10:45 — forked from dixson3/workspace.sh
Create and manage a case-sensitive disk-image on OSX. This is great when you have a need to work with case-sensitive repos on a mac.
#!/bin/bash
# where to store the sparse-bundle-image
WORKSPACE=~/Documents/workspace.dmg.sparsebundle
create() {
hdiutil create -type SPARSEBUNDLE -fs 'Case-sensitive APFS - APFS (Case-sensitive)' -size 100g -volname workspace ${WORKSPACE}
}
detach() {
@ganey
ganey / InputMask.html
Created July 30, 2018 11:57 — forked from codinronan/InputMask.html
Custom Ionic 2 & 3 Input Mask Directive
<ion-input type="tel" pattern="\d*" placeholder="(xxx) xxx-xxxx" mask="(***) ***-****" [(ngModel)]="phone" name="phone"></ion-input>
<ion-input type="tel" pattern="\d*" placeholder="xxx-xx-xxxx" mask="***-**-****" [(ngModel)]="ssn" name="ssn"></ion-input>
@ganey
ganey / FullTextSearch.php
Created April 19, 2018 14:45
Illuminate/database (Laravel) full text search
<?php
namespace Models;
trait FullTextSearch
{
/**
* I did not write this! This is purely for reference
*
* Source: https://arianacosta.com/php/laravel/tutorial-full-text-search-laravel-5/
@ganey
ganey / ButtonMonitor.py
Created April 2, 2018 21:20 — forked from Everlanders/ButtonMonitor.py
Python Script to monitor GPIO button presses and call the Camera and Backlight.
#!/usr/bin/python
import RPi.GPIO as GPIO
import time
import subprocess, os
import signal
GPIO.setmode(GPIO.BCM)
GPIO.setwarnings(False)
RearView_Switch = 14 # pin 18
Brightness_Switch = 15 # pin 16
@ganey
ganey / backlight.sh
Created April 2, 2018 21:20 — forked from Everlanders/backlight.sh
Script to Change the Backlight brightness on the Official Raspberry Pi 7" display.
#!/bin/bash
level=$1
#echo "level given is $level"
if [ $# != 1 ]; then
echo "USAGE: $0 brightness_level (0 to 255)"
exit 1
fi
@ganey
ganey / resolv.conf updates.md
Created October 17, 2017 09:44
AWS - php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution
@ganey
ganey / prune.sh
Created August 10, 2017 16:13
Git prune local branches not on remote, excluding 'master, staging , develop' - works on windows
#!/bin/sh
git branch --merged | grep -v "\*" | grep -v "master" | grep -v "develop" | grep -v "staging" | xargs -n 1 git branch -d