Skip to content

Instantly share code, notes, and snippets.

View zakxxi's full-sized avatar

Adrien Revel zakxxi

View GitHub Profile
@zakxxi
zakxxi / gist:7829585
Created December 6, 2013 18:16
Responsive Open Street Maps block
<html>
<!--RESPONSIVE OPEN STREET MAP BLOCK-->
<!--This is the wrapper block for the responsive map-->
<div id ="mapWrapper" style="position: relative">
<!--This is a transparent PNG image of 480 x 380 px in base64-->
<img style="display: block; width: 100%; height: auto;" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAXwAAAHgCAYAAACmQ9byAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAABT9JREFUeNrs1EERAAAIwzDAv+fhY5dI6KObZADodxIAGD4Ahg+A4QNg+AAYPgCGD4DhA2D4ABg+gOEDYPgAGD4Ahg+A4QNg+AAYPgCGD4DhA2D4AIYPgOEDYPgAGD4Ahg+A4QNg+AAYPgCGD2D4ABg+AIYPgOEDYPgAGD4Ahg+A4QNg+AAYPoDhA2D4ABg+AIYPgOEDYPgAGD4Ahg+A4QMYPgCGD4DhA2D4ABg+AIYPgOEDYPgAGD4Ahg9g+AAYPgCGD4DhA2D4ABg+AIYPgOEDYPgAhg+A4QNg+AAYPgCGD4DhA2D4ABg+AIYPgOEDGD4Ahg+A4QNg+AAYPgCGD4DhA2D4ABg+gOFLAGD4ABg+AIYPgOEDYPgAGD4Ahg+A4QNg+ACGD4DhA2D4ABg+AIYPgOEDYPgAGD4Ahg+A4QMYPgCGD4DhA2D4ABg+AIYPgOEDYPgAGD6A4QNg+AAYPgCGD4DhA2D4ABg+AIYPgOEDYPgAhg+A4QNg+AAYPgCGD4DhA2D4ABg+AIYPYPgAGD4Ahg+A4QNg+AAYPgCGD4DhA2D4ABg+gOEDYPgAGD4Ahg+A4QNg+AAYPgCGD4DhAxg+AIYPgOEDYPgAGD4Ahg+A4QN
@zakxxi
zakxxi / gist:20791cf50114186f88da
Created July 30, 2014 12:18
ZSH Config on OS X 10.9 with homebrew and ohmyzsh
# Path to your oh-my-zsh installation.
export ZSH=$HOME/.oh-my-zsh
# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
ZSH_THEME="robbyrussell"
# Uncomment the following line to use case-sensitive completion.
drush sql-create --db-su=root --db-su-pw=root --db-url="mysql://user:pw@localhost/db
@zakxxi
zakxxi / gist:05171fddce0e16fc0838
Created September 19, 2014 15:34
Drush site install with a profile
drush site-install <profile> --account-name=admin --account-pass=admin --db-url="mysql://usr:pwd@localhost/db"
@zakxxi
zakxxi / gist:1372d21f028ce6c38e88
Created September 24, 2014 14:50
HTML Elements
<p>
Below is just about every <abbr title="HyperText Markup Language">HTML</abbr> element you might want to use in your blog posts. Check the source code to see the many embedded elements within paragraphs.
</p>
<h1>
Heading 1
</h1>
<h2>
Heading 2
</h2>
<h3>
<div class="bs-glyphicons">
<ul class="bs-glyphicons-list">
<li>
<span class="glyphicon glyphicon-asterisk"></span>
<span class="glyphicon-class">glyphicon glyphicon-asterisk</span>
</li>
<li>
<span class="glyphicon glyphicon-plus"></span>
@zakxxi
zakxxi / gist:44e15c64f3092d3f1b4f
Last active August 29, 2015 14:11
liliServer OSC daemon
sudo /etc/init.d/liliServer.sh start | stop | restart
@zakxxi
zakxxi / gist:77c27d85d242b112bf26
Created December 19, 2014 08:23
PixelPi launch
cd ~/PixelPi/
sudo python pixelpi.py pixelinvaders --chip LPD8806 --udp-ip 192.168.0.11 --udp-port 6803 --refresh_rate 25
@zakxxi
zakxxi / gist:091ac5cb1fb8fddfb9f3
Created June 9, 2015 13:33
Composed names > UPPERCASE to Capitalize-Capitalize Capitalize (PHP)
$string = "BÉBÉ-ROSE CADUM CADUM";
$parts = explode("-", $string);
$output_parts = array();
foreach ($parts as $part) {
$output_parts[] = ucwords(mb_strtolower($part));
}
$string = implode("-", $output_parts);
// Includes functions for exporting active sheet or all sheets as JSON object (also Python object syntax compatible).
// Tweak the makePrettyJSON_ function to customize what kind of JSON to export.
var FORMAT_ONELINE = 'One-line';
var FORMAT_MULTILINE = 'Multi-line';
var FORMAT_PRETTY = 'Pretty';
var LANGUAGE_JS = 'JavaScript';
var LANGUAGE_PYTHON = 'Python';