Skip to content

Instantly share code, notes, and snippets.

View orlissenberg's full-sized avatar

Onno Lissenberg orlissenberg

View GitHub Profile
@orlissenberg
orlissenberg / create-typo3-extension.sh
Last active August 29, 2015 14:24
Create a TYPO3 extension directory structure.
#!/usr/bin/env bash
# TYPO3 - Extension directory structure
# http://docs.typo3.org/typo3cms/CodingGuidelinesReference/FileSystemConventions/ExtensionDirectoryStructure/Index.html
# This directory structure is strongly recommended. Extensions may create their own directories (for example, move all
# language files into other directories).
# execute from: typo3conf/ext
if [ $# -eq 0 ]
@orlissenberg
orlissenberg / gist:cd92b94a71737224a283
Created April 16, 2015 10:30
List of Parser Tokens Values on the CLI.
//
// http://php.net/manual/en/tokens.php
//
// WARNING: This means that the concrete value of a token may change between two PHP versions. For example the T_FILE constant is 365 in
// PHP 5.3, while the same value refers now to T_TRAIT in PHP 5.4 and the value of T_FILE is 369.
//
-> php -r 'for ($i=200; $i<500; $i++){ if (token_name($i) !== "UNKNOWN") { echo $i . " " . token_name($i) . "\n"; } };'
@orlissenberg
orlissenberg / fetch_ip.sh
Last active August 29, 2015 14:10
Fetch IPv4 address from ifconfig with awk shell script.
#!/bin/sh
# Examples:
# ./fetch_ip.sh "" docker
# ./fetch_ip.sh "" lo
# ./fetch_ip.sh 192.168
# ./fetch_ip.sh 192.168 eth1
ifconfig | awk '{
if ($0 ~ /Link encap:/ && $0 ~ /'$2'/) {
@orlissenberg
orlissenberg / gist:7125064
Created October 23, 2013 19:28
Configure Kaleidoscope as the GIT difftool on the terminal.
------------------------------------
.git/config
------------------------------------
[diff]
tool = ksdiff
[difftool "ksdiff"]
cmd = ksdiff \"$LOCAL\" \"$REMOTE\"
------------------------------------