From | To | Expression |
---|
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
" Adapted from http://laktek.com/2012/09/05/distraction-free-writing-with-vim/ | |
" to work with my setup, linux + xterm | |
function! DistractionFreeWriting() | |
colorscheme iawriter | |
set background=light | |
set gfn=Cousine:h14 " font to use | |
"set lines=40 columns=100 " size of the editable area | |
"set fuoptions=background:#00f5f6f6 " macvim specific setting for editor's background color· | |
set guioptions-=r " remove right scrollbar |
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
<html> | |
<head> | |
<!-- Need pnglib http://www.xarg.org/download/pnglib.js --> | |
<script src="pnglib.js"></script> | |
<script> | |
// Change value of textarea to previous executed code | |
window.onload = function () { | |
if ( get_cookie("code") ) { | |
code.value = get_cookie("code"); | |
} |
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
let g:focuscolour = 0 | |
function! ToggleFocusColor() | |
if (g:focuscolour) | |
colorscheme desert | |
let g:focuscolour = 0 | |
else | |
colorscheme focus-dark | |
let g:focuscolour = 1 | |
endif |
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 sys | |
from bs4 import BeautifulSoup | |
import requests | |
import urllib | |
try: | |
r = requests.get(sys.argv[1]) | |
if r.status_code != 200: | |
exit('Page not found') |
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 sys | |
import requests | |
def main(coin='USD'): | |
url = 'http://data.mtgox.com/api/2/BTCUSD/money/ticker' | |
if coin == 'EUR': | |
url = 'https://data.mtgox.com/api/2/BTCEUR/money/ticker' | |
r = requests.get(url) |
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 os | |
for dirpath, dirnames, filenames in os.walk('.'): | |
for f in filenames: | |
fp = os.path.join(dirpath, f) | |
size = os.path.getsize(fp) | |
if size < 1024: | |
print f |
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
# coding=UTF-8 | |
from __future__ import division | |
import re | |
# This is a naive text summarization algorithm | |
# Created by Shlomi Babluki | |
# April, 2013 | |
class SummaryTool(object): |
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/perl | |
use strict; | |
use warnings; | |
if ($ARGV[0] =~ /^f+uu+$/) { | |
print qx{git reset --hard HEAD^}; | |
} | |
else { | |
my $args = join(' ', @ARGV); |
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
syntax on | |
colorscheme desert | |
filetype plugin indent on | |
" 256 colors | |
set t_Co=256 | |
set backspace=indent,eol,start | |
set cmdheight=2 | |
set fileencodings=ucs-bom,utf-8,default,latin1 |
OlderNewer