Skip to content

Instantly share code, notes, and snippets.

View ryross's full-sized avatar

Ryder Ross ryross

View GitHub Profile
@ryross
ryross / gist:509256
Created August 5, 2010 04:56
public_html/index.php
<?php
/**
* The directory in which your application specific resources are located.
* The application directory must contain the bootstrap.php file.
*
* @see http://kohanaframework.org/guide/about.install#application
*/
$application = '../application';
@ryross
ryross / odroid_to_ssd.sh
Last active July 2, 2023 22:10
Move Odroid filesystem to SSD
## Instructions to switch odroid over to external ssd
# You shouldn’t see any errors when running this process, if you do. Stop immediately and ask me.
# run lsblk to see all the hard drives. You should see a line starting with mmcblk0 and then 2 more underneath it with
# mmcblk0p1 and mmcblk0p2. That’s the sd card disk and the sd card partitions. You’ll also see a line starting with
# sda (and/or sdb if there are two usb drives). We want to use the sd* one.
lsblk
#pull out some of the values from lsblk so we can automate the rest of the script
read new_partition new_drive mountpoint <<< `lsblk -e 179 -l -o NAME,PKNAME,FSTYPE,MOUNTPOINT |grep 'vfat\s*/media/odroid' | awk {'print $1" "$2" "$4'}`
@ryross
ryross / Vagrantfile
Created May 15, 2019 20:00
ubuntu vagrant
# -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure("2") do |config|
# The most common configuration options are documented and commented below.
# For a complete reference, please see the online documentation at
<?php
/**
* Temporary function to delete fields attached to entities that have already
* been deleted. This assumes there are no deleted fields that need to be
* purged as this won't actually remove their tables in the database. Use with
* caution and only when fully understanding what this does compared to
* field_purge_batch and field_purge_field_storage.
*/
function _fix_missing_entities_during_field_purge() {
@ryross
ryross / AddressHelper.php
Last active August 16, 2017 21:36 — forked from jonathonbyrdziak/AddressHelper.php
Parse Address :: This function is designed to parse a complete street address using PHP. If it can't figure out the parsing itself, then it sends the address to google to have google parse the street address.
<?php
namespace App\Parsers\AddressParser;
/**
* @author Jonathon Byrd
* @package Address Parsing
*
*
*/
class AddressHelper extends ObjectBase
@ryross
ryross / 01.Start.js
Created February 3, 2017 15:18
SBC OCAP Chrome Snippets
$('[name="personFieldset[firstName]"]').val('First').change()
$('[name="personFieldset[lastName]"]').val('Last').change()
$('#btnStart').click()
@ryross
ryross / chart.js
Created July 22, 2016 21:36
chart.js
$series_default = [
'EXVs.Exv1Position' => ['color' => '#00ff80', 'dashStyle' => 'Dot', 'yAxis' => 1],
'EXVs.Exv2Position' => ['color' => '#0dc4f2', 'dashStyle' => 'Dot', 'yAxis' => 1],
'EXVs.Exv3Position' => ['dashStyle' => 'Dot', 'yAxis' => 1],
'EXVs.Exv4Position' => ['dashStyle' => 'Dot', 'yAxis' => 1],
'Temperatures.Suction1Temp' => ['color' => '#39e600', 'dashStyle' => 'Solid'],
'Temperatures.Suction2Temp' => ['color' => '#00ccff', 'dashStyle' => 'Solid'],
'Temperatures.Suction3Temp' => ['dashStyle' => 'Solid'],
'Temperatures.CompressorInletTemp' => ['color' => '#739900', 'dashStyled' => 'Solid'],
'Temperatures.Compressor1InletTemp' => ['dashStyled' => 'Solid'],
@ryross
ryross / clone.sh
Last active July 22, 2016 16:17
Clone ODROID SSD
## Instructions to clone odroid external ssd over to a new external ssd
# You shouldn’t see any errors when running this process, if you do. Stop immediately and ask me.
# run lsblk to see all the hard drives. You should see a line starting with mmcblk0 and then 2 more underneath it with
# mmcblk0p1 and mmcblk0p2. That’s the sd card disk and the sd card partitions. You’ll also see a line starting with
# sda (and/or sdb if there are two usb drives). We want to use the sd* one.
lsblk
#pull out some of the values from lsblk so we can automate the rest of the script
read new_partition new_drive mountpoint <<< `lsblk -e 179 -l -o NAME,PKNAME,FSTYPE,MOUNTPOINT |grep 'vfat\s*/media/odroid' | awk {'print $1" "$2" "$4'}`
#!/bin/sh
#
# chkconfig: 35 99 99
# description: Script for starting phantomjs.
#
. /etc/rc.d/init.d/functions
USER="phantomjs"
@ryross
ryross / pichromium
Created April 11, 2016 05:37 — forked from syrgak/pichromium
Instructions to Install Chromium 45 on Raspbian Jessie
#!/bin/bash
wget http://ftp.us.debian.org/debian/pool/main/libg/libgcrypt11/libgcrypt11_1.5.0-5+deb7u4_armhf.deb
wget http://launchpadlibrarian.net/218525709/chromium-browser_45.0.2454.85-0ubuntu0.14.04.1.1097_armhf.deb
wget http://launchpadlibrarian.net/218525711/chromium-codecs-ffmpeg-extra_45.0.2454.85-0ubuntu0.14.04.1.1097_armhf.deb
sudo dpkg -i libgcrypt11_1.5.0-5+deb7u4_armhf.deb
sudo dpkg -i chromium-codecs-ffmpeg-extra_45.0.2454.85-0ubuntu0.14.04.1.1097_armhf.deb
sudo dpkg -i chromium-browser_45.0.2454.85-0ubuntu0.14.04.1.1097_armhf.deb