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
wget -c "https://boot.netboot.xyz/ipxe/netboot.xyz.lkrn" -O /boot/netboot.xyz.lkrn && \ | |
cat > /etc/grub.d/40_custom <<EOF | |
#!/bin/sh | |
exec tail -n +3 \$0 | |
menuentry 'netboot.xyz' { | |
set root='hd0,msdos1' | |
linux16 /netboot.xyz.lkrn | |
} | |
EOF | |
update-grub |
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
Solve for i: 9x-7i > 3(3x-7u) | |
9x-7i > 3(3x-7u) | |
-9x-7i > 9x-21u | |
-7i > -21u | |
-i > -3u | |
i < 3u |
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
01:15:52 <pipecloud> While working on getting rubygems.org to work on ruby 2.1 and 2.0, I've seem to hit a problem. the gem archives in test/gems/dos* are being used in test/unit/pusher_test.rb and they return StringIO objects. I've called #read on them prior to passing them Cutter.new, but I'm out of my understanding when they complain about "string contains null byte". I'm | |
01:15:52 <pipecloud> curious about what I should change, but more curious about how they pass currently. | |
01:16:58 <pipecloud> I'm going to be checking into 1.9.3 and seeing how it works there and hopefully that'll give me some more information. | |
01:24:00 <pipecloud> Where's sj26 when you need him? :( | |
01:34:07 <pipecloud> I doubt it has anything to do with marshalling like in https://groups.google.com/forum/#!msg/ruby-core-google/eMLd2MgOnVU/OedFMqUOcuEJ which drbrain_ commented on, but I guess I'll keep digging. |
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 hooman(name) | |
"I am a pink, fleshy human named, #{name}." | |
rescue ArgumentError => e | |
self.logger "Someone screwed up again, bob." | |
raise HumanError(e) | |
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
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 |
NewerOlder