This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"bytes" | |
"io/ioutil" | |
"strings" | |
) | |
func isLetterWorks(entry []byte) bool { | |
return strings.Contains(strings.ToLower(compact(entry)), "letterworks") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def deb_compare(left, right) | |
mine = left.scan(/\d+|[^\d]+/) | |
theirs = right.scan(/\d+|[^\d]+/) | |
lhs = mine.shift | |
rhs = theirs.shift | |
while lhs | |
if rhs.nil? | |
if lhs == '~' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -v | |
apt-get update | |
apt-get install -y python-pip python-dev libffi-dev libssl-dev | |
pip install s3cmd | |
pip install markupsafe | |
mkdir /root/ansible |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo "this should show double up arrow: ⇈" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function ps1_bgl { | |
source ~/.nightscout/info.sh | |
local RED="$(tput setaf 1 2>/dev/null || echo '')" | |
local GREEN="$(tput setaf 2 2>/dev/null || echo '')" | |
local YELLOW="$(tput setaf 3 2>/dev/null || echo '')" | |
local NO_COLOR="$(tput sgr0 2>/dev/null || echo '')" | |
local trend="?" | |
case ${nightscout_trend} in |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#tunables! | |
VERBOSE = false | |
MAX_DEBT = 15_000 | |
MIN_DEBT = 500 | |
MAX_APR = 30 | |
DEBT_MONEY = 1500 | |
SIMULATION_ATTEMPTS = 1000 | |
class Debt |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'nokogiri' | |
require 'open-uri' | |
URL = "http://www.wunderground.com/US/TX/173.html" #change this if you're not in cedar park | |
TIMESTAMP = /^\d\d\/\d\d\/\d\d\d\d/ | |
$seen = {} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def blah | |
puts "what" | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function parse_git_branch { | |
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/[\1]/' | |
} | |
function proml { | |
local BLUE="\[\033[0;34m\]" | |
local RED="\[\033[0;31m\]" | |
local LIGHT_RED="\[\033[1;31m\]" | |
local GREEN="\[\033[0;32m\]" | |
local LIGHT_GREEN="\[\033[1;32m\]" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class DbLog < ActiveRecord::Base | |
belongs_to :loggable, :polymorphic => true | |
module Loggable | |
extend ActiveSupport::Concern | |
included do | |
has_many :db_logs, :foreign_key => "loggable_id" if self.respond_to?(:has_many) | |
end |
NewerOlder