Skip to content

Instantly share code, notes, and snippets.

@michaelklapper
michaelklapper / .bashrc
Created February 15, 2013 15:13
Add private SSH-key to agent on shell login. #windows7 #git #bash
#!/bin/bash
eval `ssh-agent -s`
ssh-add
@michaelklapper
michaelklapper / fake_backup_time.sh
Created February 13, 2013 19:17
Set the current time as backup creation date
date +'%Y-%m-%d %H:%M:%S' > production/backup_successful.txt
@michaelklapper
michaelklapper / ext_localconf.php
Created February 13, 2013 08:55
Register eID call in TYPO3 to provide lightweight initialized environment to render content in a fast way. This is typically used by AJAX calls in the frontend.
$TYPO3_CONF_VARS['FE']['eID_include']['tx_extension_controller'] = 'EXT:extension/Resources/Private/Eid/NameDispatch.php';
@michaelklapper
michaelklapper / virtualbox_vagrant_home.bat
Last active May 23, 2023 06:24
Reconfigure VirtualBox and Vagrant home directory for Windows Set VirtualBox home directory to: C:\VMs Store vagrant boxes: C:\VMs\vagrant.d
# VirtualBox home directory.
"C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" setproperty machinefolder "C:\VMs"
# Vagrant home directory for downloadad boxes.
REG ADD HKCU\Environment /v VAGRANT_HOME /t REG_SZ /d "C:\VMs\vagrant.d"
# ~/.gitconfig from @boblet
# initially based on http://rails.wincent.com/wiki/Git_quickstart
[core]
excludesfile = /Users/oli/.gitignore
legacyheaders = false # >git 1.5
quotepath = false
# http://stackoverflow.com/questions/136178/git-diff-handling-long-lines
pager = less -r
# if ↑ doesn’t work, try: pager = less -+$LESS -FRX
//PhantomJS http://phantomjs.org/ based web crawler Anton Ivanov anton.al.ivanov@gmail.com 2012
(function(host) {
function Crawler() {
this.visitedURLs = {};
};
Crawler.webpage = require('webpage');
//PhantomJS http://phantomjs.org/ based web crawler Anton Ivanov anton.al.ivanov@gmail.com 2012
(function(host) {
function Crawler() {
this.visitedURLs = {};
};
Crawler.webpage = require('webpage');