Skip to content

Instantly share code, notes, and snippets.

View obstschale's full-sized avatar
🥑
Avocado for the wise.

Hans-Helge Buerger obstschale

🥑
Avocado for the wise.
View GitHub Profile
@obstschale
obstschale / .inputrc
Created January 31, 2014 09:28
.inputrc controls how programs using the readline library (including bash) behave. It is loaded automatically. For full details see the Function and Variable Index section of the GNU readline manual. Consider the following settings: (src: http://www.zsh.org/mla/users/2006/msg01114.html )
# Ignore case while completing
set completion-ignore-case on
# Make Bash 8bit clean
set meta-flag on
set convert-meta off
set output-meta on
@obstschale
obstschale / dock_separator
Created February 18, 2014 10:08
Adds a separation space in your Mac Dock.
$ defaults write com.apple.dock persistent-apps -array-add '{ "tile-type" = "spacer-tile"; }'
$ killall Dock
@obstschale
obstschale / levenstein_distance.m
Last active August 29, 2015 13:56
Calculate Levenstein distance using Octave function
%% Levenstein Distance: calculate levenstein distance with matrix
function [distance] = levenstein_distance(x, y, output = 0)
% initialization
ma = zeros( size(y,2)+1, size(x,2)+1 );
ma(1,:) = [0:size(x,2)];
ma(:,1) = [0:size(y,2)];
for i=2:size(ma,1)
for j=2:size(ma,2)
ma(i,j) = min( [ ma(i,j-1)+1, ma(i-1,j)+1, ma(i-1,j-1)+1- (y(i-1)==x(j-1)) ] );
@obstschale
obstschale / wget octave
Created February 25, 2014 14:16
Download complete Octave documentation with wget: -k (make links suitable for local viewing) -r (download recursively to get all pages) -np (do not follow parents; stay in 'interpreter')
wget -k -r -np http://www.gnu.org/software/octave/doc/interpreter/
@obstschale
obstschale / vvv-log
Last active August 29, 2015 14:01
VVV log output
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'ubuntu/trusty64'...
Progress: 90%
==> default: Matching MAC address for NAT networking...
==> default: Checking if box 'ubuntu/trusty64' is up to date...
==> default: Setting the name of the VM: wordpress-vagrant_default_1400506899365_45722
==> default: Clearing any previously set forwarded ports...
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
@obstschale
obstschale / gist:fb1a46ba32ce71cd5bec
Created June 19, 2014 14:35
Kategorisierungsbanner
<p class="beginner-banner" style="
border-color: #5BC0DE;
background: #F4F8FA;
border-left: 3px solid #5BC0DE;
padding: 1em;
font-weight: bold;
color: #5BC0DE;
">Anfänger</p>
<p class="advanced-banner" style="
#! /bin/bash
# A modification of Dean Clatworthy's deploy script as found here: https://github.com/deanc/wordpress-plugin-git-svn
# The difference is that this script lives in the plugin's git repo & doesn't require an existing SVN repo.
# main config
PLUGINSLUG="camptix-payfast-gateway"
CURRENTDIR=`pwd`
MAINFILE="camptix-payfast.php" # this should be the name of your main php file in the wordpress plugin
# git config
@obstschale
obstschale / ipython_collection.md
Last active August 29, 2015 14:08
Link collection of iPython stuff

iPython Notebook

Useful Links, Tutorials, and Books


First of all, here the easiest way to install and run it on your system:

  1. Download and install Anaconda
  2. Run the command ipython notebook in the desired folder. This will start your default browser and open the iPython dashboard
  3. Select the desired notebook or create one yourself.
@obstschale
obstschale / gist:8f14e1b6bebbc8a7e627
Last active August 29, 2015 14:18
tree leaflet.markercluster
.
├── .bower.json
├── .gitignore
├── .travis.yml
├── CHANGELOG.md
├── Jakefile.js
├── MIT-LICENCE.txt
├── README.md
├── build
│   ├── build.js
@obstschale
obstschale / test.php
Created May 4, 2015 06:59
WordPress Test File. Simply put it into the same folder where wp-config.php lives.
<?php
// Load the WordPress Environment
define( 'WP_DEBUG', true );
require('./wp-load.php');
?>
<pre>
<?php
$arrayName = array('val1', 'val2' );