Skip to content

Instantly share code, notes, and snippets.

//PhantomJS http://phantomjs.org/ based web crawler Anton Ivanov [email protected] 2012
(function(host) {
function Crawler() {
this.visitedURLs = {};
};
Crawler.webpage = require('webpage');
//PhantomJS http://phantomjs.org/ based web crawler Anton Ivanov [email protected] 2012
(function(host) {
function Crawler() {
this.visitedURLs = {};
};
Crawler.webpage = require('webpage');
# ~/.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
@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"
@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 / 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 / .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
wget http://xdebug.org/files/xdebug-2.2.1.tgz
tar -xzvf xdebug-2.2.1.tgz
cd xdebug-2.2.1
phpize
./configure --enable-xdebug
sudo make
sudo make install
sudo service apache2 restart
##################################################
# Background Images
#
lib.misc.background {
page = FILES
page {
references {
@michaelklapper
michaelklapper / gist:5318154
Created April 5, 2013 10:06
Simulate REST-API call via curl
curl -i -X POST -H 'Content-Type: application/json' -d '{"product": "123,124", "docId": "1", "description": "test description", "file": {"data": "VGhpcyBpcyBhbiBlbmNvZGVkIHN0cmluZw==", "filename": "filename.txt"}, "contentType": "TD_BA", "lifecycleProduct": "asdasf", "name": "test", "language": "0", "title": "test title", "author": "author name", "modified": "1364375700", "externalProduct": "1"}' www.domain.de/index.php?id=1634