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 'singleton' # => true | |
| module Kernel | |
| def d | |
| DiceBag.instance | |
| end | |
| end | |
| class DiceDSL |
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
| %r{^ | |
| (?<top_or_bottom>t|b)? # top or bottom info | |
| (?<tb_number>\d)? # tb single digit | |
| (?<dice>\[.*\]) # anything surrounded by [] | |
| (?<explode>\*)?\=? # conditional literal asterisk and = | |
| (?<target>.*)?$ | |
| }x |
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
| " This folder is automatically created in zph's .zshrc | |
| set backupdir=~/tmp/vim | |
| set directory=~/tmp/vim " Don't clutter my dirs up with swp and tmp files | |
| " EXPERIMENTAL | |
| " Set persistent undo for vim using tempdir | |
| set undodir=~/tmp/vim | |
| set undofile |
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
| ##### | |
| # OLD CONFIG | |
| # === | |
| Pry.commands.alias_command 'x', 'exit' | |
| Pry.commands.alias_command 'wh', 'whereami' | |
| Pry.commands.alias_command 'pl', 'play -l' | |
| Pry.commands.alias_command 'ht', 'hist -T' | |
| Pry.commands.alias_command 'hr', 'hist -r' | |
| Pry.config.editor = proc { |file, line| "vim +#{line} #{file}"} | |
| # == Pry-Nav - Using pry as a debugger == |
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 get_rstring(addr): | |
| s = addr.cast(string_t.pointer()) | |
| if s['basic']['flags'] & (1 << 13): | |
| return s['as']['heap']['ptr'].string() | |
| else: | |
| return s['as']['ary'].string() | |
| def get_lineno(iseq, pos): | |
| if pos != 0: | |
| pos -= 1 |
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
| " Hack for speeding up vim load when using rvm | |
| "let g:ruby_path = system('rvm use system') | |
| " Sun Feb 16 21:37:02 EST 2014 - Consider trying 'infect' + pathogen | |
| "=bundle tpope/vim-pathogen | |
| "=bundle tpope/vim-sensible | |
| source ~/.vim/bundle/vim-pathogen/autoload/pathogen.vim | |
| execute pathogen#infect('bundle/{}') |
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
| #!/usr/bin/ruby | |
| branch_name = `git rev-parse --abbrev-ref HEAD`.chomp | |
| DIVIDERS = %r{[-|_|/|\/]} | |
| parts = branch_name.match(/(?<initials>.+)#{DIVIDERS}(?<number>\d{3,})#{DIVIDERS}(?<description>.*)/) | |
| begin | |
| INITIALS = parts[:initials].split(DIVIDERS).join("/").upcase |
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
| #!/usr/bin/env ruby | |
| branch_name = `git rev-parse --abbrev-ref HEAD`.chomp | |
| DIVIDERS = %r{[-|_|/|\/]} | |
| parts = branch_name.match(/(?<initials>.+)#{DIVIDERS}(?<number>\d{5,})#{DIVIDERS}(?<description>.*)/) | |
| begin | |
| INITIALS = parts[:initials].split(DIVIDERS).join("/").upcase |
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
| # TODO: | |
| # - write function to transform jam update to jam upgrade | |
| # Apps | |
| # Port num + 100 reserved for puma control | |
| export COMPANY_PREFIX='RP' | |
| export RP_AG_CONTROL_PORT=9392 | |
| export RP_CONFUSION_CONTROL_PORT=9410 | |
| export RP_PORTAL_CONTROL_PORT=9411 | |
| export RP_RNR_UI_CONTROL_PORT=9413 | |
| export RP_SECRET_TOKEN='pumarules' |
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
| #!/usr/bin/python | |
| # Quick and dirty demonstration of CVE-2014-0160 by Jared Stafford (jspenguin@jspenguin.org) | |
| # The author disclaims copyright to this source code. | |
| import sys | |
| import struct | |
| import socket | |
| import time | |
| import select |