Skip to content

Instantly share code, notes, and snippets.

View desyncr's full-sized avatar

DC* desyncr

View GitHub Profile
/*!
* jQuery TextChange Plugin
* http://www.zurb.com/playground/jquery-text-change-custom-event
*
* Copyright 2010, ZURB
* Released under the MIT License
*/
(function ($) {
$.event.special.textchange = {
#compdef hub
# Zsh will source this file when attempting to autoload the "_hub" function,
# typically on the first attempt to complete the hub command. We define two new
# setup helper routines (one for the zsh-distributed version, one for the
# git-distributed, bash-based version). Then we redefine the "_hub" function to
# call "_git" after some other interception.
#
# This is pretty fragile, if you think about it. Any number of implementation
# changes in the "_git" scripts could cause problems down the road. It would be
@desyncr
desyncr / config.h
Created December 3, 2013 05:50
Tabbed (http://git.suckless.org/tabbed) configuration.
/* See LICENSE file for copyright and license details. */
/* appearance */
static const char font[] = "-*-*-medium-*-*-*-10-*-*-*-*-*-*-*";
static const char normbgcolor[] = "#333333";
static const char normfgcolor[] = "#cccccc";
static const char selbgcolor[] = "#000000";
static const char selfgcolor[] = "#cccccc";
static const char before[] = "<";
static const char after[] = ">";
@desyncr
desyncr / config.h
Created December 3, 2013 05:52
Vimprobable configuration
/*
(c) 2009 by Leon Winter
(c) 2009-2012 by Hannes Schueller
(c) 2009-2010 by Matto Fransen
(c) 2010-2011 by Hans-Peter Deifel
(c) 2010-2011 by Thomas Adam
(c) 2011 by Albert Kim
(c) 2013 Daniel Carl
see LICENSE file
*/
@desyncr
desyncr / pipes.sh
Created December 3, 2013 05:55
Small pipes shell script
#!/bin/sh
# original: http://pastebin.com/2PMfGJBM
declare -i f=75 s=13 r=2000 t=0 c=1 n=0 l=0
declare -ir w=$(tput cols) h=$(tput lines)
declare -i x=$((w/2)) y=$((h/2))
declare -ar v=( [00]="\x83" [01]="\x8f" [03]="\x93"
[10]="\x9b" [11]="\x81" [12]="\x93"
[21]="\x97" [22]="\x83" [23]="\x9b"
[30]="\x97" [32]="\x8f" [33]="\x81" )
@desyncr
desyncr / bspwmrc
Created December 3, 2013 21:32
Hack to keep two monitors synced (on the same desktop both) on bspwm
# keep bspwm monitors synced
ctrl + alt + Tab
bspc monitor -f DVI-I-0 ; bspc desktop -f next ; bspc monitor -f VGA-0 ; bspc desktop -f next
ctrl + alt + shift + Tab
bspc monitor -f DVI-I-0 ; bspc desktop -f prev; bspc monitor -f VGA-0 ; bspc desktop -f prev
@desyncr
desyncr / homepage.html
Created December 5, 2013 06:49
Vimprobable custom start page
<html>
<head>
<title>Home</title>
<style>
body {
font-family: arial, sans-serif;
font-size: 13px;
background: black;
color: gray;
overflow: hidden;
@desyncr
desyncr / inittab
Last active June 21, 2016 11:51 — forked from jonjensen/kill-large-processes.pl
Small Perl script to monitor and kill processes that are using too much memory or CPU.
# Example inittab entry (/etc/inittab)
# this will create a daemonized process which init will watch and respawn as needed
1001::respawn:/usr/bin/perl /usr/local/bin/kill-large-processes.pl
@desyncr
desyncr / magnet2torrent
Created January 1, 2014 23:34
Script to create a .torrent file from a magnet link. Adapted from https://wiki.archlinux.org/index.php/Rtorrent
#!/bin/bash
[[ "$1" =~ xt=urn:btih:([^&/]+) ]] || exit;
echo "d10:magnet-uri${#1}:${1}e" > "meta-${BASH_REMATCH[1]}.torrent"
@desyncr
desyncr / gist:8458086
Created January 16, 2014 16:32
Monit default configuration
###############################################################################
## Monit control file
###############################################################################
##
## Comments begin with a '#' and extend through the end of the line. Keywords
## are case insensitive. All path's MUST BE FULLY QUALIFIED, starting with '/'.
##
## Below you will find examples of some frequently used statements. For
## information about the control file and a complete list of statements and
## options, please have a look in the Monit manual.