This file contains 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 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
" where i'm | |
set number | |
set cursorline | |
set nocursorcolumn | |
" work with .vimrc | |
map ,v :sp ~/.vimrc<cr> " edit my .vimrc file in a split | |
map ,e :e ~/.vimrc<cr> " edit my .vimrc file | |
map ,u :source ~/.vimrc<cr> " update the system settings from my vimrc file |
This file contains 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
mkdir -p mini; for img in `ls *.jpg`; do convert -fill white -geometry 100x200 -size 100x200 -scale 100x200 $img mini/$img; echo "<a style='display: block; width: 100px; height: 200px; float: left; margin: 10px; border: solid 1pX #ccc' href='$img' onclick='window.open(this.href); return false'><img src='mini/$img' /></a>"; done > gallery.html | |
google-chrome gallery.html |
This file contains 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 numpy | |
import urllib2 | |
import time | |
import sys | |
if len(sys.argv) < 2: | |
sys.stout.write( "Usage: %s http://page/ counter\n" % sys.argv[0]) | |
sys.exit(0) | |
site = sys.argv[1] |
This file contains 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 | |
# -*- coding: utf-8 -*- | |
""" | |
Find files recursively using given file extensions and run given command on random 'n' files: | |
* python randomrun.py -e mkv,avi,ogm -r vlc -c 4 /some/dir/ # run 4 random moves using vlc | |
* python randomrun.py -e txt,dat -r cat -c 3 -p /some/dir/ # run cat on 3 random files parallelly | |
""" | |
import argparse |
This file contains 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/bash | |
# put jsgrep into ~/bin | |
# wget https://gist.github.com/onjin/5353305 | |
# | |
# crontab: | |
# * * * * ~/path/to/conkybtc | |
# | |
# .conkyrc: | |
# ${execpi 30 cat .conkybtc } | |
# |
This file contains 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 | |
import sys | |
import re | |
import json | |
def jsongrep(d, patterns): | |
try: | |
pattern = patterns.pop(0) | |
except IndexError: |
This file contains 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 | |
""" | |
Git commit hook: | |
.git/hooks/commit-msg | |
Check commit message according to angularjs guidelines: | |
* https://docs.google.com/document/d/1QrDFcIiPjSLDn3EL15IJygNPiHORgU1_OOAqWjiDU5Y/edit# | |
""" | |
import sys |
This file contains 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
{ | |
"pools" : [ | |
{ | |
"url" : "http://stratum.d7.lt:3333", | |
"user" : "user.1", | |
"pass" : "pass" | |
} | |
] | |
, |
This file contains 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 | |
# https://launchpad.net/~dotcloud/+archive/lxc-docker/+packages | |
### BEGIN INIT INFO | |
# Provides: docker | |
# Required-Start: $local_fs $remote_fs | |
# Required-Stop: $local_fs $remote_fs | |
# Should-Start: autofs $network $named alsa-utils pulseaudio | |
# Should-Stop: autofs $network $named alsa-utils pulseaudio | |
# Default-Start: 2 3 4 5 |
OlderNewer