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! BddFindFunction() | |
ruby<<E___ | |
line = VIM::Buffer.current.line | |
if /^\s*(?:[Gg]iven|[Ww]hen|[Tt]hen|[Bb]ut|[Aa]nd)\s+"([^"]+)".*$/ =~ line | |
function_name = $1.gsub(/[^A-Za-z0-9\s]/, "").gsub(/\s+/, "_").downcase | |
Vim::command('call searchpos("def ' + function_name + '")') | |
else | |
Vim::message "Not a BDD :^(" | |
end | |
E___ |
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 perl | |
BEGIN { $Curses::OldCurses = 1; } | |
use strict; | |
use warnings; | |
use Curses; | |
use perlmenu; | |
my $ARGC = $#ARGV + 1; | |
my $killid = 15; | |
my @all_pids; |
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/perl | |
use strict; | |
use warnings; | |
use File::Path qw(make_path); | |
my $download_url = "http://sourceforge.net/projects/davmail/files/latest/download?source=files"; | |
my $user_agent = 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/34.0.1847.116 Chrome/34.0.1847.116 Safari/537.36'; | |
my $version_file = "davmail_version"; | |
my $davmail_deb = "davmail_latest.deb"; | |
my $version_path = "$ENV{'HOME'}/.config/davmail_updater"; |
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
for (ln <- io.Source.stdin.getLines) | |
println(ln map {c => "\\u%04X".format(c.toInt)} mkString) |
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
prompt_setup_nathan(){ | |
ZSH_THEME_GIT_PROMPT_PREFIX="%{$reset_color%}%{$fg[green]%}" | |
ZSH_THEME_GIT_PROMPT_SUFFIX="" | |
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[yellow]%}⚡" | |
ZSH_THEME_GIT_PROMPT_ADDED="%{$fg[cyan]%}✚" | |
ZSH_THEME_GIT_PROMPT_DELETED="%{$fg[red]%}✖" | |
ZSH_THEME_GIT_PROMPT_CLEAN="" | |
# ZSH_THEME_GIT_PROMPT_MODIFIED="%{$fg[blue]%}✹%{$reset_color%}" | |
# ZSH_THEME_GIT_PROMPT_RENAMED="%{$fg[magenta]%} ➜" |
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 python | |
""" | |
Adjust screen brightness. | |
Usage: `bright 10` | |
Default is to adjust brightness via hardware. | |
'-s' flag will make the tool adjust brightness via software. | |
'-g' flag prints current brightness (hardware) | |
Use '-d' and '-i' to decrement and increment, respectively. (hardware) | |
TODO: make '-sg' show software brightness | |
""" |
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
local box = {x=10,y=10,w=50,h=80} | |
local mouseButton = 1 | |
function love.load() | |
love.graphics.setBackgroundColor(255,255,255) | |
love.graphics.setColor(225,62,62) | |
end | |
function love.draw() | |
love.graphics.rectangle("fill", box.x, box.y, box.w, box.h) |
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
weechat.register("weenote", | |
"Nathan", | |
"1.0", | |
"Beerware", | |
"My personal notification script", | |
"", | |
"UTF-8") | |
local settings = { | |
match = "my_nick" |
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
#include <ncurses.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <time.h> | |
/* Functions */ | |
void mvdraw(int,int,int); | |
void push(int); | |
void game_over(int); | |
void place_fruit(void); |
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
set-option -g default-command "reattach-to-user-namespace -l sh" | |
# change bind key to C-a | |
unbind -n C-b | |
set-option -g prefix C-a | |
bind-key C-a send-prefix | |
# disable mouse | |
bind-key m \ | |
set -g mode-mouse off \;\ |