Skip to content

Instantly share code, notes, and snippets.

View kogakure's full-sized avatar
🏠
Working from home

Stefan Imhoff kogakure

🏠
Working from home
View GitHub Profile
@kogakure
kogakure / gist:81124
Created March 18, 2009 13:43
Bash: Typolight – Set rights and delete sample files
#!/bin/bash
find . -type f -exec chmod 664 {} \;
find . -type d -exec chmod 775 {} \;
rm templates/example_website.sql
rm -rf tl_files/music_academy/
chmod 777 . print.css basic.css news.xml system/config/localconfig.php system/tmp/ system/html/
@kogakure
kogakure / gist:135926
Created June 25, 2009 15:33
Bash: Convert folders recursively to git repos
#!/bin/bash
# Convert folders recursively to git repos
# Run it in the folder that holds all your project folders
for i in $( ls -d */ ); do
string=$i
length=${#string}
project=${string:0:$length-1}
cd $project
junkdel # Special script to delete all junk files
@kogakure
kogakure / gist:148482
Created July 16, 2009 15:44
Bash: Symlink on project website
#!/bin/sh
#
# Create a VHost for Apache on Mac OSX and create a symlink to the project root.
# Usage: "sudo vhost_symlink domain.suffix"
ME=<username>
SITES=/Users/$ME/Sites
PROJECTS=/Users/$ME/<Projects/Customers>
VHOST=/etc/apache2/extra/httpd-vhosts.conf
@kogakure
kogakure / .gitignore
Last active December 17, 2023 08:21
Git: .gitignore file for LaTeX projects
*.acn
*.acr
*.alg
*.aux
*.bak
*.bbl
*.bcf
*.blg
*.brf
*.bst
@kogakure
kogakure / gist:202940
Created October 6, 2009 11:41
CSS: Front-Face
@font-face {
font-family: 'Graublau Web';
src: url(GraublauWeb.eot);
src: local('☺'),
url('GraublauWeb.woff') format('woff'),
url('GraublauWeb.ttf') format('truetype'),
url('GraublauWeb.svg#graublauweb') format('svg');
}
@kogakure
kogakure / gist:205825
Created October 9, 2009 07:28
Bash: Git – Rename an email address in all old commits.
# Rename an email address in all old commits.
# WARNING: Will change all your commit SHA1s.
# Based off of the script from here:
# http://coffee.geek.nz/how-change-author-git.html
git filter-branch -f --commit-filter '
if [ "$GIT_COMMITTER_EMAIL" = "joern.zaefferer@googlemail.com" ];
then
GIT_AUTHOR_EMAIL="joern.zaefferer@gmail.com";
GIT_COMMITTER_EMAIL="joern.zaefferer@gmail.com";
git commit-tree "$@";
@kogakure
kogakure / fabfile.py
Created October 17, 2009 14:20
Python: Fabric 0.9/1.x - Synchronize files with rsync
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Fabric 0.9/1.x – Synchronize files in a project folder with webserver
from fabric.api import env
from fabric.contrib.project import rsync_project
env.hosts = ['domain.com']
env.path = '/home/user/project/'
@kogakure
kogakure / fabfile.py
Created October 17, 2009 15:15 — forked from jefftriplett/fabfile.py for django
Python: Deployment for Django with Fabric
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
fabfile for Django
------------------
see http://morethanseven.net/2009/07/27/fabric-django-git-apache-mod_wsgi-virtualenv-and-p/
modified for fabric 0.9/1.0 by Hraban (fiëé visuëlle)
several additions, corrections and customizations, too
@kogakure
kogakure / gist:218467
Created October 26, 2009 07:02
Bash: Git - New remote branch
#!/bin/sh
# http://www.zorched.net/2008/04/14/start-a-new-branch-on-your-remote-git-repository/
# git-create-branch <branch_name>
if [ $# -ne 1 ]; then
echo 1>&2 Usage: $0 branch_name
exit 127
fi
branch_name=$1
@kogakure
kogakure / tinyMCE.php
Created October 26, 2009 19:59
PHP: Typolight: TinyMCE - config
<?php if (!defined('TL_ROOT')) die('You can not access this file directly!');
/**
* TYPOlight webCMS
* Copyright (C) 2005-2009 Leo Feyer
*
* This program is free software: you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation, either
* version 2.1 of the License, or (at your option) any later version.