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! SelectComment() | |
| let curindent = indent(".") | |
| let commstr = &commentstring[0] | |
| " bail if not a comment | |
| if getline(".")[curindent] != commstr | |
| return | |
| endif | |
| " find the first commented line |
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
| " Original Authoer Araxia@Freenode/#vim | |
| function! RecursiveFileSearch(callback) " {{{ | |
| let bad_paths = '^\(' . expand('~') . '\|' . expand('/') .'\)$' | |
| if match(getcwd(), bad_paths) > -1 | |
| echo printf("Are you kidding? You want to recursively search in '%s'?", getcwd()) | |
| else | |
| exe a:callback | |
| end | |
| endf |
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
| # unicorn_rails -c /data/github/current/config/unicorn.rb -E production -D | |
| # Set by set_env anyway | |
| rails_env = ENV['RAILS_ENV'] || 'production' | |
| # 4 workers in testing and 1 master | |
| worker_processes (rails_env == 'production' ? 4 : 1) | |
| # Load rails+github.git into the master before forking workers | |
| # for super-fast worker spawn times |
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
| pcm.!default { | |
| type hw | |
| card 1 | |
| } | |
| ctl.!default { | |
| type hw | |
| card 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
| #!/bin/sh | |
| [ -z "$have_rvm" ] && | |
| source /etc/profile.d/rvm.sh |
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
| import ourgit | |
| class GitModule(BawtM2): | |
| _name = "GitModule" | |
| privmsg_re = "^(!|%(nick)s:\s+)git ?([^ ].*)" | |
| def handle_privmsg(self, msg): | |
| if self.auth(msg.nick): | |
| cmd = 'git ' + self.m.group(2) | |
| if cmd: | |
| self.parent.privmsg(msg.replyto, ourgit.oneline(cmd)) |
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 Thing(object): | |
| def __init__(_, data): | |
| print("I use _ for my instances, because fucking with people is great") | |
| _.data = data | |
| def get_data(_): | |
| print(_.data) | |
| b = Thing("rawr!") | |
| b.get_data() |
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
| module Twat::Endpoints | |
| class Identica | |
| def initialize | |
| module Twitter | |
| module Request | |
| def request(method, path, params, options) | |
| path.gsub!(%r|^/1|, '') | |
| super(method, path, params, options) | |
| 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
| module Twat::Endpoints | |
| class Identica | |
| def initialize | |
| ::Twitter.module_eval do | |
| Request.module_eval do | |
| def request(method, path, params, options) | |
| path.gsub!(%r|^/1|, '') | |
| super(method, path, params, options) | |
| 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
| module Twat::Endpoints | |
| class Identica | |
| def initialize | |
| ::Twitter::Request.module_eval do | |
| def request(method, path, params, options) | |
| # Needs original method body, seems to be impossible to call original | |
| # implementation | |
| # FIXME subclass the whole show? | |
| path.gsub!(%r|^1/|, '') |
OlderNewer