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
| " Use pathogen to easily modify the runtime path to include all | |
| " " plugins under the ~/.vim/bundle directory | |
| call pathogen#helptags() | |
| call pathogen#runtime_append_all_bundles() | |
| syntax on | |
| filetype plugin indent on | |
| set scrolloff=5 " allways show at least 3 lines | |
| set wildmode=longest,list |
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
Show hidden characters
| [ | |
| { "keys": ["ctrl+s"], "command": "repl_transfer_current", "args": {"scope": "selection"}}, | |
| { "keys": ["shift+ctrl+s"], "command": "repl_transfer_current", "args": {"scope": "selection", "action":"view_write"}}, | |
| { "keys": ["ctrl+f"], "command": "repl_transfer_current", "args": {"scope": "file"}}, | |
| { "keys": ["shift+ctrl+f"], "command": "repl_transfer_current", "args": {"scope": "file", "action":"view_write"}}, | |
| { "keys": ["ctrl+l"], "command": "repl_transfer_current", "args": {"scope": "lines"}}, | |
| { "keys": ["shift+ctrl+l"], "command": "repl_transfer_current", "args": {"scope": "lines", "action":"view_write"}}, | |
| { "keys": ["ctrl+b"], "command": "repl_transfer_current", "args": {"scope": "block"}}, | |
| { "keys": ["shift+ctrl+b"], "command": "repl_transfer_current", "args": {"scope": "block", "action":"view_write"}} | |
| ] |
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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title>Bootstrap 101 Template</title> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | |
| <!-- Bootstrap --> | |
| <link href="css/bootstrap.min.css" rel="stylesheet" media="screen"> | |
| <style type="text/css"> | |
| #contacts .avatar { |
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
| # Configs | |
| config defaultToCurrentScreen true | |
| config nudgePercentOf screenSize | |
| config resizePercentOf screenSize | |
| config secondsBetweenRepeat 0.1 | |
| config checkDefaultsOnLoad true | |
| config focusCheckWidthMax 3000 | |
| # config keyboardLayout dvorak | |
| config windowHintsShowIcons true | |
| config windowHintsIgnoreHiddenWindows false |
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
| #!/bin/bash | |
| for i in aux bbl blg fdb_latexmk fls out synctex.gz log toc lof lot | |
| do | |
| rm *.$i | |
| done |
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
| def traverse_dict(node, leaf_fn, node_fn=lambda v, path: None, path=tuple()): | |
| for k, v in node.iteritems(): | |
| current_path = path + tuple([k]) | |
| if isinstance(v, dict): | |
| node_fn(v, current_path) | |
| traverse_dict(v, leaf_fn, node_fn, current_path) | |
| elif isinstance(v, list): | |
| current_path = current_path + tuple(["[*]"]) | |
| for i in v: | |
| if isinstance(i, dict): |
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
| % scientific abbreviations made easy | |
| \newcommand{\compare}[2]{\cite[cf. #2]{#1}} | |
| \newcommand{\page}[2]{\cite[p.#2]{#1}} | |
| \newcommand{\pageF}[2]{\cite[p.#2 et seq.]{#1}} | |
| \newcommand{\pageFF}[2]{\cite[p.#2 et seqq.]{#1}} | |
| % example call | |
| % \pageFF{my_source_key}{43} |
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 | |
| from sh import git | |
| def main(): | |
| print "before:" | |
| print git('br') | |
| for br in git('br', '--no-color'): | |
| br = br.strip() | |
| if "master" in br: continue |
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
| from multiprocessing import Pool, cpu_count | |
| def multi_process_map(fn, args): | |
| '''Applyes function fn to each element in args running in a seperate process. | |
| This will block until all function calls are finished. | |
| This uses a process pool, which size equals the number of available cpu's. | |
| fn: a funtion that takes one argument | |
| args: a list of arguments to that function |
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
| import time | |
| def timeit(method): | |
| def timed(*args, **kw): | |
| ts = time.time() | |
| result = method(*args, **kw) | |
| te = time.time() | |
| print '%r (%r, %r) %2.2f sec' % \ |