Skip to content

Instantly share code, notes, and snippets.

View johnschult's full-sized avatar

John Schult johnschult

  • Johns Creek, GA
View GitHub Profile
@johnschult
johnschult / raspi-motd.sh
Created December 8, 2016 20:34 — forked from piksel/raspi-motd.sh
Script for setting a nice raspberry pi logo as MOTD on debian.
#!/bin/bash
logo="$(tput setaf 2)
.~~. .~~.
'. \ ' ' / .'$(tput setaf 1)
.~ .~~~..~. $(tput sgr0) _ _ $(tput setaf 1)
: .~.'~'.~. : $(tput sgr0) ___ ___ ___ ___| |_ ___ ___ ___ _ _ ___|_|$(tput setaf 1)
~ ( ) ( ) ~ $(tput sgr0) | _| .'|_ -| . | . | -_| _| _| | | | . | |$(tput setaf 1)
( : '~'.~.'~' : ) $(tput sgr0) |_| |__,|___| _|___|___|_| |_| |_ | | _|_|$(tput setaf 1)
~ .~ ( ) ~. ~ $(tput sgr0) |_| |___| |_| $(tput setaf 1)
var Throttle, _insts, bound, cp, formatFleURL, fs, rcp, request;
if (Meteor.isServer) {
/*
@description Require "fs-extra" npm package
*/
fs = Npm.require("fs-extra");
request = Npm.require("request");
Throttle = Npm.require("throttle");
@johnschult
johnschult / boxcast_origin_instance_info.rb
Last active August 29, 2015 14:02
EC2 show instance tags
require 'rubygems'
require 'aws-sdk'
LAYER = 'boxcast_origin'
STACK = 'dev.boxcast.com'
TAG_PREFIX = 'boxcast:origin'
ec2 = AWS::EC2.new()
boxcast_origin_instances = []
@johnschult
johnschult / bookmarklet
Last active August 29, 2015 13:59
Fixed X1 Send to TV bookmarklet JS to transform all YouTube URLs to use HD and auto play in full screen. The original JS only worked on m.youtube URLs and did not use HD or work correctly if you used the bookmarklet on your desktop.
javascript:(function()%7Bvar z%3Ddocument.createElement(%27script%27)%3Bz.src%3D%27https://gist.githubusercontent.com/johnschult/10974466/raw/9aa0dbaaed5cb2c0871766db461e280932f3f2fb/bookmarklet-tv.js%27%3Bdocument.body.appendChild(z)%3B%7D)()

title: remark description: Introduce remark. name: inverse layout: true class: center, middle, inverse

#remark [ri-mahrk]

What is it and why should I be using it?

database = begin
File.read(File.dirname(__FILE__) + '/config/database.yml').scan(/production.+?adapter\W+(\w+)/im).join
rescue
nil
end
case database
when /postgres/, /pg/
gem 'pg', :require => false
when /sqlite/
#!/usr/bin/ruby
#
# This script installs to /usr/local only. To install elsewhere you can just
# untar http://github.com/mxcl/homebrew/tarball/master anywhere you like.
#
#
# 30th March 2010:
# Added a check to make sure user is in the staff group. This was a problem
# for me, and I think it was due to me migrating my account over several
# versions of OS X. I cannot verify that for sure, and it was tested on
$ set -x ; rvm --trace version
+ rvm --trace version
+ [[ ! -z \[\033[1;33m\]\W\[\033[0m\]$(parse_git_branch) ∴ ]]
+ export rvm_interactive=1
+ rvm_interactive=1
+ [[ -z '' ]]
+ trap 'rm -rf "$rvm_tmp_path/$$" >/dev/null 2>&1' 0 1 2 3 15
++ cat /Users/schulty/.rvm/lib/VERSION.yml
++ tail -n 3
++ sed 's/^.*: //g'
$ rvm --trace list rubies
grep: rvm\/bin:: No such file or directory
grep: trace: No such file or directory
+ [[ -z '' ]]
+ [[ ! -z '' ]]
+ [[ ! -z '' ]]
+ [[ ! -z '' ]]
+ [[ 2 -gt 0 ]]
+ rvm_token=list
+ shift
#!/usr/local/bin/ruby
require 'rubygems'
require 'hpricot'
require 'open-uri'
require 'atom/pub'
require 'htmlentities'
ENV['TZ'] = 'US/Eastern'
BASE_URL = "http://investorshub.advfn.com/boards/"