action | command | link |
---|---|---|
fix identation | :gg=G |
http://vim.wikia.com/wiki/Fix_indentation |
remove trailing space | :%s/\s\+$// |
http://vim.wikia.com/wiki/Remove_unwanted_spaces |
string replace | :%s/foo/bar/gc |
http://vim.wikia.com/wiki/Search_and_replace |
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
[alias] | |
co = checkout | |
cob = checkout -b | |
ci = commit | |
com = commit -m | |
cp = cherry-pick | |
st = status -s | |
cl = clone | |
br = branch | |
diff = diff --word-diff |
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/python2.7 | |
import sys | |
def gftp_descrable_password(password): | |
"""gftp password descrambler | |
This code has been released in the Public Domain by the original author. | |
""" |
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/ruby | |
require 'csv' | |
bank_csv = Array.new | |
CSV.foreach("umsatz.csv", { :col_sep => ";" }) do |row| | |
bank_csv << [row[0].gsub(".", "-"), 0, row[4], row[2], row[4], row[5].gsub(",", "."), row[3]] | |
end | |
CSV.open("homebank-import.csv", "wb", { :col_sep => ";" }) do |csv| |
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/env ruby | |
def euclid(m, k) | |
if k==0 | |
return m | |
else | |
return euclid(k, m%k) | |
end | |
end |
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 | |
# TODO use $TLD to build a regex for egrep and strlen of head | |
TLD=to | |
for domain in $(aspell -l en dump master | egrep '^\w{3,5}to$') | |
do | |
domain=$(echo $domain | head -c-3).$TLD | |
echo $domain | |
whois $domain | grep "Status: free" >/dev/null && echo "the domain $domain seems available" |
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
# added "-J-Dswing.aatext=true -J-Dawt.useSystemAAFontSettings=lcd" | |
netbeans_default_options="-J-client -J-Xss2m -J-Xms32m -J-XX:PermSize=32m -J-Dapple.laf.useScreenMenuBar=true -J-Dapple.awt.graphics.UseQuartz=true -J-Dsun.java2d.noddraw=true -J-Dsun.java2d.dpiaware=true -J-Dsun.zip.disableMemoryMapping=true -J-Dswing.aatext=true -J-Dawt.useSystemAAFontSettings=lcd" | |
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 | |
# . .:free space checker:. | |
# -o- | |
# ' .-. . | |
# __/ @_\_ . * -o- | |
# (________) ' | |
# | |
# * | | |
# . --o-- |
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
# ~/.bashrc: executed by bash(1) for non-login shells. | |
export PS1='\h:\w\$ ' | |
umask 022 | |
# colors | |
export LS_OPTIONS='--color=auto' | |
eval "`dircolors`" | |
alias ls='ls $LS_OPTIONS' | |
# alias ll='ls $LS_OPTIONS -l' |
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/python | |
# -*- coding: utf-8 -*- | |
""" | |
remd - remember days and get a mail notification. | |
contacts.db assumed to be in same directory. | |
Copyright (C) 2013 pce | |
# Cronjob everyday at 0'o clock | |
# crontab -e |