Skip to content

Instantly share code, notes, and snippets.

View vyp's full-sized avatar
🇵🇸
From the river to the sea, Palestine will be free 🇵🇸

xd1le vyp

🇵🇸
From the river to the sea, Palestine will be free 🇵🇸
View GitHub Profile
@benmills
benmills / bspwm_dzen.sh
Created April 18, 2013 04:50
Simple dzen panel for bspwm
#!/bin/bash
while true; do
if read line < $PANEL_FIFO; then
wm_status=""
IFS=':' read -a array <<< "$line"
for element in "${array[@]}"; do
if [[ $element =~ ^D ]]; then
wm_status="$wm_status ^fg(white)${element:1}"
elif [[ $element =~ ^d ]]; then
@toivoh
toivoh / sexpr.jl
Created November 20, 2012 21:06
lispy AST printer and reader
# ---- @sexpr: S-expression to AST conversion ----
is_expr(ex, head::Symbol) = (isa(ex, Expr) && (ex.head == head))
is_expr(ex, head::Symbol, n::Int) = is_expr(ex, head) && length(ex.args) == n
macro sexpr(ex)
esc(sexpr_to_expr(ex))
end
sexpr_to_expr(ex) = expr(:quote, ex)
@sjl
sjl / nextlast.vim
Created September 21, 2012 15:36
next/last text objects
" Next and Last {{{
" Motion for "next/last object". "Last" here means "previous", not "final".
" Unfortunately the "p" motion was already taken for paragraphs.
"
" Next acts on the next object of the given type in the current line, last acts
" on the previous object of the given type in the current line.
"
" Currently only works for (, [, {, b, r, B, ', and ".
"
@piscisaureus
piscisaureus / pr.md
Created August 13, 2012 16:12
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

@w0ng
w0ng / .Xresources-hybrid
Last active August 22, 2023 14:05
Terminal colourscheme for use in hybrid.vim
! Hybrid Terminal Colours. Uses the palette from Tomorrow-Night:
! https://github.com/chriskempson/tomorrow-theme/blob/master/vim/colors/Tomorrow-Night.vim
! vim: ft=xdefaults
*background: #1D1F21
*foreground: #C5C8C6
! black
*color0: #282A2E
*color8: #373B41
! red