Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Stefan Imhoff kogakure

🏠
Working from home
View GitHub Profile
@kogakure
kogakure / .bash_profile
Created Dec 9, 2008
Bash: .bash_profile, .bashrc
View .bash_profile
source ~/.bashrc
# Unix Aliase
alias ll="ls -lisa"
alias la="ls -la"
alias ls-l="ls -l"
alias cd..="cd .."
alias ..="cd .."
alias ...="cd ../.."
alias workssh="ssh user@domain"
@kogakure
kogakure / update_latest_revisions.py
Created Dec 9, 2008
Python: Updates Subversion, Git, Mercurial and Bazaar repositories recursive
View update_latest_revisions.py
#!/usr/bin/python
import os
import os.path
from subprocess import call
if __name__ == "__main__":
apps_dir = os.path.abspath('.')
for app_name in os.listdir(apps_dir):
app_dir = os.path.abspath(os.path.join(apps_dir, app_name))
git_path = os.path.join(app_dir, '.git')
@kogakure
kogakure / commit_latest_revisions.py
Created Dec 9, 2008
Python: Commits all Git and Git-SVN repositories
View commit_latest_revisions.py
#!/usr/env/python
import os
import os.path
from subprocess import call
if __name__ == "__main__":
apps_dir = os.path.abspath('.')
for app_name in os.listdir(apps_dir):
app_dir = os.path.abspath(os.path.join(apps_dir, app_name))
git_path = os.path.join(app_dir, '.git')
@kogakure
kogakure / .gitconfig
Created Dec 9, 2008
Git: .gitconfig, .gitignore, .gitk
View .gitconfig
[user]
name = John Doe
email = john.doe@gmail.com
[core]
excludesfile = /Users/doe/.gitignore
[color]
status = auto
diff = auto
branch = auto
interacitve = auto
@kogakure
kogakure / .hgrc
Created Dec 9, 2008
Mercurial: .hgrc
View .hgrc
[ui]
username = John Doe <john.doe@gmail.com>
[defaults]
cdiff = -q
[extdiff]
cmd.cdiff = colordiff
opts.cdiff = -uprN
@kogakure
kogakure / .vimrc
Last active May 20, 2016
Vim: .vimrc
View .vimrc
" ###################
" # Global Settings #
" ###################
" Default shell
set shell=/bin/zsh
scriptencoding utf-8
" #######
" Bundles
@kogakure
kogakure / settings.py
Created Dec 9, 2008
Python: Django Templates: settings.py, local_settings.py
View settings.py
#!/usr/bin/python
# -*- coding: utf-8 -*-
import os.path
import sys
# Basic Settings
PROJECT_ROOT = os.path.dirname(os.path.abspath(__file__))
PROJECT_NAME = os.path.split(PROJECT_ROOT)[-1]
MEDIA_ROOT = '%s/media/' % PROJECT_ROOT
@kogakure
kogakure / delpyc.sh
Created Dec 9, 2008
Bash: Delete Python compiled files recursive
View delpyc.sh
#!/bin/bash
find ./ -type f -name "*.pyc" -exec rm -f {} \;
@kogakure
kogakure / pylink.sh
Created Dec 9, 2008
Bash: Link Python package into `site-packages`
View pylink.sh
@kogakure
kogakure / umlaute.pl
Created Dec 9, 2008
Perl: Remove all Umlauts and special characters from filenames
View umlaute.pl
#!/usr/bin/perl
#===============================================================================
#
# FILE: renametree.pl
#
# USAGE: ./renametree.pl
#
# DESCRIPTION: rename files and directories in the current tree to
# eliminate special characters