Skip to content

Instantly share code, notes, and snippets.

View ryross's full-sized avatar

Ryder Ross ryross

View GitHub Profile
@ryross
ryross / .bashrc
Created October 30, 2010 00:27
bash prompt w/ git branch
## GIT PROMPT
RED="\[\033[0;31m\]"
YELLOW="\[\033[0;33m\]"
GREEN="\[\033[0;32m\]"
BLUE="\[\033[0;34m\]"
LIGHT_RED="\[\033[1;31m\]"
LIGHT_GREEN="\[\033[1;32m\]"
WHITE="\[\033[1;37m\]"
LIGHT_GRAY="\[\033[0;37m\]"
@ryross
ryross / ryderbeans.vim
Created November 2, 2010 23:40
fork of jellybeans vim colorscheme
" Vim color file
"
" " __ _ _ _ "
" " \ \ ___| | |_ _| |__ ___ __ _ _ __ ___ "
" " \ \/ _ \ | | | | | _ \ / _ \/ _ | _ \/ __| "
" " /\_/ / __/ | | |_| | |_| | __/ |_| | | | \__ \ "
" " \___/ \___|_|_|\__ |____/ \___|\____|_| |_|___/ "
" " \___/ "
"
" "A colorful, dark color scheme for Vim."
@ryross
ryross / gist:3953663
Created October 25, 2012 16:02
Git Alias Commands for new accounts
# pretty git log http://www.jukie.net/bart/blog/pimping-out-git-log
git config --global alias.lg "log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative"
<?php
interface Context {
public function execute($params);
}
@ryross
ryross / gist:5564565
Created May 12, 2013 19:10
windows gvim rc
execute pathogen#infect()
syntax on
filetype plugin indent on
colorscheme slate
set guifont=courier_new:h11
:let mapleader = ","
map <leader>n :NERDTreeToggle<CR>
set guioptions-=T
set guioptions-=m
@ryross
ryross / orm.php
Created May 14, 2013 01:48
extended orm class to auto save created & updated datetimes.
<?php
class ORM extends Kohana_ORM {
public function create(Validation $validation = NULL) {
if (isset($this->_table_columns['created_at'])) {
$this->created_at = date('Y-m-d H:i:s');
}
if (isset($this->_table_columns['updated_at'])) {
@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
#!/bin/sh
#
# chkconfig: 35 99 99
# description: Script for starting phantomjs.
#
. /etc/rc.d/init.d/functions
USER="phantomjs"
@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'}`
@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'],