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
d(100) Class STR INT DEX WIS CON CHA | |
---------------------------------------------------------------------- | |
1 Fighter 14 9 10 10 10 7 | |
2 Magic-User 9 11 5 9 10 12 | |
3 Thief 10 11 10 13 17 12 | |
4 Cleric 4 11 12 8 6 12 | |
5 Elf 11 16 10 9 4 7 | |
6 Cleric 12 6 14 10 9 15 | |
7 Thief 10 11 10 13 11 13 | |
8 Dwarf 17 10 14 13 12 3 |
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 random | |
[sum(sorted((random.randint(1,6) for _ in range(4)), reverse=True)[:3]) for _ in range(6)] |
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
If I am making a new class that inherits from an old library that | |
doesn't have object as its base class (doesn't use the new-style | |
classes), is it recommended that I add object as an additional | |
parent like this: | |
Class MyNewClass(OldStyleClass, object): | |
and then use super, or stick to the old style and call the init | |
like: |
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
alias pr='post-review --bugs-closed=$(git name-rev --name-only HEAD | sed "s/\(.*\)\([0-9][0-9][0-9][0-9]\)\(.*\)/\2/") --branch=$(git name-rev --name-only HEAD) --tracking-branch=origin/develop --guess-description --guess-summary --open' |
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
// blacklist for nko_spamurl_blocker pluging | |
$finder[] = '[/link]'; | |
$finder[] = '[/url]'; | |
$finder[] = '[/url ]'; | |
$finder[] = '<a href= '; | |
$finder[] = '<a href=”'; | |
$finder[] = '<a href=“'; | |
$finder[] = '<a href=“'; | |
$finder[] = '<a href=”'; |
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
property archiveFilePath : "/Users/ramanan/Desktop/Text Files/SimpleText/Archive.taskpaper" | |
property archiveFileName : "Archive.taskpaper" | |
tell application "Finder" | |
if exists (archiveFilePath) as POSIX file then | |
tell application "TaskPaper" | |
-- save what the front most file is | |
set currentFile to front document | |
-- open archive file |
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
// http://1kbgrid.com as a sass file. | |
// | |
// To use, import this file into another sass file that sets all the variables. | |
// For example, I use this within the following sass file to generate the grid | |
// for my iPhone blog | |
// | |
// !column_width = 40px | |
// !gutter_width = 20px | |
// !number_of_columns = 11 | |
// |
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
property archiveFilePath : "/Users/ramanan/Dropbox/SimpleText/Archive.taskpaper" | |
property archiveFileName : "Archive.taskpaper" | |
tell application "Finder" | |
if exists (archiveFilePath) as POSIX file then | |
tell application "TaskPaper" | |
-- save what the front most file is | |
set currentFile to front document | |
-- open archive file |
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
ENV['GEM_HOME'] = '/home/ramanan/local/gems' | |
ENV['GEM_PATH'] = '$GEM_HOME:/usr/lib/ruby/gems/1.8' | |
require 'rubygems' | |
Gem.clear_paths | |
require 'vendor/sinatra/lib/sinatra.rb' | |
Sinatra::Base.set(:run, false) | |
Sinatra::Base.set(:env, :production); |
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/sh | |
export PATH="/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:/Users/ramanan/local/bin:$PATH" | |
# dump database, downlaod it locally, restore it over local copy | |
# of the database. Everything is done in /tmp/ | |
cd /tmp/ | |
# cd to the tmp directory on funkaoshi.com; dump the database | |
# out of mysql, and gzip it up. |