Skip to content

Instantly share code, notes, and snippets.

View IchHabRecht's full-sized avatar

Nicole Hummel IchHabRecht

  • biz-design
  • Berlin, Germany
View GitHub Profile
@IchHabRecht
IchHabRecht / git-write-changelog
Last active December 22, 2015 19:49
Writes a ChangeLog depending on your git commits
#!/bin/sh
WRITE=false
FILE="ChangeLog"
GITPATH="master..HEAD"
while [ "$1" != "" ]; do
case $1 in
-c )
GITPATH=""
@IchHabRecht
IchHabRecht / gist:6521965
Last active December 22, 2015 19:49
Composer installation of mink/behat
"C:\Users\Nicole\Version Control\Composer\behat\composer.json"
{
"require": {
"behat/behat": "2.4.*@stable",
"behat/mink": "1.4@stable",
"behat/mink-goutte-driver": "*",
"behat/mink-selenium-driver": "*",
"behat/mink-selenium2-driver": "*",
"behat/mink-sahi-driver": "*",
@IchHabRecht
IchHabRecht / gist:6300309
Created August 21, 2013 21:06
[PHP] Add memory usage to output
$content = '<!-- BEFORE: ' . (memory_get_peak_usage() / 1048576) . ' -->';
$content .= '<!-- AFTER: ' . (memory_get_peak_usage() / 1048576) . ' -->';
@IchHabRecht
IchHabRecht / gist:6300228
Created August 21, 2013 21:01
[GIT] Perform Git update on subdirectories
#!/bin/sh
find . -type d -name .git -exec sh -c "cd \"{}\"/../ && pwd && if git status | grep -q \"nothing to commit\"
then
git pull
else
git stash && git pull && git stash pop
fi" \;
@IchHabRecht
IchHabRecht / gist:6300193
Created August 21, 2013 20:58
[VCL] Advanced Varnish-TYPO3 Configuration
backend default {
.host = "127.0.0.1";
.port = "8080";
}
# Enable flushing access only to internals
acl flushers {
"127.0.0.1";
}
@IchHabRecht
IchHabRecht / gist:6300141
Created August 21, 2013 20:54
[TYPO3] Alternating table classes
RTE {
## define table classes
classes.myCustomTable {
name = My custom table layout
alternating.rows {
# 0 = even, 1 = odd
startAt = 0
oddClass = row-odd
@IchHabRecht
IchHabRecht / gist:6300130
Created August 21, 2013 20:53
[GIT] Set author and commit date
GIT_AUTHOR_DATE='2013-02-18 17:45' GIT_COMMITTER_DATE='2013-02-18 17:45' git commit -m ""
@IchHabRecht
IchHabRecht / gist:6300101
Created August 21, 2013 20:50
[GIT] Replace commit date with author date
git filter-branch --env-filter 'GIT_COMMITTER_DATE=$GIT_AUTHOR_DATE; export GIT_COMMITTER_DATE'
@IchHabRecht
IchHabRecht / gist:6300091
Created August 21, 2013 20:50
[BASH] Chroot bind9
/etc/init.d/bind9 stop
mkdir -p /var/chroot/bind9/{etc,dev,var/cache/bind,var/run/bind/run}
chown -R bind:bind /var/chroot/bind9/var/*
mknod /var/chroot/bind9/dev/null c 1 3
mknod /var/chroot/bind9/dev/random c 1 8
chmod 666 /var/chroot/bind9/dev/{null,random}
mv /etc/bind /var/chroot/bind9/etc
ln -s /var/chroot/bind9/etc/bind /etc/bind
chown -R bind:bind /etc/bind/*
nano /etc/default/bind9
@IchHabRecht
IchHabRecht / gist:6300085
Created August 21, 2013 20:49
[WINDOWS] Enable host access for VMWare client
1) Ping
Name: Ping (public)
Protocol: ICMPv4
Specific ICMP types: echo request
Scope: IP range
2) Apache HTTP Server
Switch from deny to allow for both rules (TCP and UDP)
Set up IP scope