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 bash | |
# This should work whether you are already in a TMUX session or not... | |
# Irssi directory is assumed to be in the user's home dir | |
if [ -z "$TMUX" ] | |
then | |
tmux new-session -d -s ircuser | |
tmux split-window -tircuser -h -l20 | |
tmux send-keys -tircuser "tmux send-keys -t0 \"irssi\" C-m; \ | |
tmux send-keys -t0 \"/set nicklist_height \$(stty size | cut -f1 -d' ' -)\" C-m; \ | |
tmux send-keys -t0 \"/set nicklist_width \$(stty size | cut -f2 -d' ' -)\" C-m; \ |
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
" When started as "evim", evim.vim will already have done these settings. | |
if v:progname =~? "evim" | |
finish | |
endif | |
" Use Vim settings, rather then Vi settings (much better!). | |
" This must be first, because it changes other options as a side effect. | |
set nocompatible | |
" allow backspacing over everything in insert mode |
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
# I use iTerm2, which enables clicking to open URLs, but if the line wraps in the middle of one, | |
# iTerm2 does not recognize this. This script greatly decreases the chance that long URLs will wrap | |
# by using the Tiny URL API to shorten the URL. The script intercepts the message, and converts all URLs in place. | |
# | |
# DEPENDENCIES: must have the cURL command line utilities installed. | |
# DISCLAIMER: I don't use Windows, I don't know how cURL works on Windows, and I don't guarantee this will work. If it does, great! | |
use strict; | |
use Irssi; | |
use vars qw($VERSION %IRSSI); |
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 \;\ |
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
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
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
#!/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
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
for (ln <- io.Source.stdin.getLines) | |
println(ln map {c => "\\u%04X".format(c.toInt)} mkString) |
OlderNewer