This file contains 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
import _winreg | |
def DecodeKey(rpk): | |
rpkOffset = 52 | |
i = 28 | |
szPossibleChars = "BCDFGHJKMPQRTVWXY2346789" | |
szProductKey = "" | |
while i >= 0: | |
dwAccumulator = 0 |
This file contains 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
$ curl https://api.github.com/zen | octocatsay | |
MMM. .MMM | |
MMMMMMMMMMMMMMMMMMM | |
MMMMMMMMMMMMMMMMMMM ____________________________ | |
MMMMMMMMMMMMMMMMMMMMM | | | |
MMMMMMMMMMMMMMMMMMMMMMM | Practicality beats purity. | | |
MMMMMMMMMMMMMMMMMMMMMMMM |_ ________________________| | |
MMMM::- -:::::::- -::MMMM |/ | |
MM~:~ ~:::::~ ~:~MM |
This file contains 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
begin | |
require "bundler/inline" | |
rescue LoadError => e | |
$stderr.puts "Bundler version 1.10 or later is required. Please update your Bundler" | |
raise e | |
end | |
gemfile(true) do | |
source "https://rubygems.org" |
This file contains 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 -e | |
# mirror_test.sh | |
# benchmarks closest ubuntu mirrors and outputs them in speed order | |
# bash -c "$(curl -fsSL https://gist.githubusercontent.com/lox/9152137/raw/mirror_test.sh)" | |
RELEASE=$(lsb_release -c -s 2>/dev/null || echo 14.04) | |
MIRRORS=$(curl -s http://mirrors.ubuntu.com/mirrors.txt) | |
TESTFILE="dists/$RELEASE/main/binary-amd64/Packages.bz2" | |
TIMEOUT=1 |
This file contains 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 smux { | |
AUTOSSH_POLL=10 | |
AUTOSSH_PORT=$(awk 'BEGIN { srand(); do r = rand()*32000; while ( r < 20000 ); printf("%d\n",r) }' < /dev/null) | |
#AUTOSSH_GATETIME=30 | |
#AUTOSSH_LOGFILE=autossh.$HOST.log | |
#AUTOSSH_DEBUG=yes | |
#AUTOSSH_PATH=/usr/local/bin/ssh | |
export AUTOSSH_POLL AUTOSSH_LOGFILE AUTOSSH_DEBUG AUTOSSH_PATH AUTOSSH_GATETIME AUTOSSH_PORT |
This file contains 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 search(tp_id1, rule_id1, tp_id2, rule_id2) | |
ActiveRecord::Base.connection.execute("SELECT * FROM tracked_points, rules WHERE (tracked_points.id = ? AND rules.id = ?) OR (tracked_points.id = ? AND rules.id = ?)", tp_id1, rule_id1, tp_id2, rule_id2) | |
end |
This file contains 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
# Module | |
# ------ | |
module ProtectedFields | |
# There is probably a nicer way to do this... | |
def self.included(base) | |
base.class_eval { | |
def self.protected_attributes(attrs = []) | |
@@protected_attributes = attrs | |
end |
This file contains 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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Label</key> | |
<string>net.damacy.releasemem</string> | |
<key>ProgramArguments</key> | |
<array> | |
<string>/Users/jrollins/usr/bin/releasemem.py</string> | |
</array> |
This file contains 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
#!/usr/bin/env bash | |
apt-get -y update | |
apt-get -y install build-essential zlib1g-dev libssl-dev libreadline5-dev libyaml-dev | |
cd /tmp | |
wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p125.tar.gz | |
tar -xvzf ruby-1.9.3-p125.tar.gz | |
cd ruby-1.9.3-p125/ | |
./configure --prefix=/usr/local | |
make | |
make install |
This file contains 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
respond_to do |format| | |
format.js | |
end | |
def show | |
@course = OfferedCourse.find(params[:id]) | |
end |
NewerOlder