Skip to content

Instantly share code, notes, and snippets.

Ryder Ross ryross

Block or report user

Report or block ryross

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@ryross
ryross / Vagrantfile
Created May 15, 2019
ubuntu vagrant
View Vagrantfile
# -*- 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
View _fix_missing_entities_during_field_purge.php
<?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 Aug 16, 2017 — forked from Jonathonbyrd/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.
View AddressHelper.php
<?php
namespace App\Parsers\AddressParser;
/**
* @author Jonathon Byrd
* @package Address Parsing
*
*
*/
class AddressHelper extends ObjectBase
@ryross
ryross / 01.Start.js
Created Feb 3, 2017
SBC OCAP Chrome Snippets
View 01.Start.js
$('[name="personFieldset[firstName]"]').val('First').change()
$('[name="personFieldset[lastName]"]').val('Last').change()
$('#btnStart').click()
View 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 Jul 22, 2016
Clone ODROID SSD
View clone.sh
## 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'}`
@ryross
ryross / odroid_to_ssd.sh
Last active Feb 28, 2019
Move Odroid filesystem to SSD
View odroid_to_ssd.sh
## 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 / pichromium
Created Apr 11, 2016 — forked from syrgak/pichromium
Instructions to Install Chromium 45 on Raspbian Jessie
View pichromium
#!/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
View phantomjs
#!/bin/sh
#
# chkconfig: 35 99 99
# description: Script for starting phantomjs.
#
. /etc/rc.d/init.d/functions
USER="phantomjs"
View phantom.sh
#!/bin/bash
#
# Depends on phantom.js being installed
#
PHANTOM_CMD="phantomjs"
command -v $PHANTOM_CMD > /dev/null || { echo "Phantomjs not found"; exit 1; }
get_phantom_pid (){
You can’t perform that action at this time.