This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? | |
/* | |
This shortcode display a google map with some markers on it. | |
*/ | |
/* | |
<!--Usage :--> | |
[amod-map] | |
Somewhere###<strong></strong><br /><a href="http://foobar.com/"###-25.363882,174.044922 | |
Somewhere else###<strong></strong><br /><a href="http://foobar.com/"###15.549876,131.123489 | |
[/amod-map] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Debian: jessie/sid | |
Atom: 103 | |
Node: v0.10.28 | |
npm: v1.4.4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#... | |
alias vgrt-up='(cd vagrant && vagrant up)' | |
alias vgrt-ssh='(cd vagrant && vagrant ssh)' | |
alias vgrt-status='(cd vagrant && vagrant status)' | |
alias vgrt-halt='(cd vagrant && vagrant halt)' | |
alias ssh-dev='ssh root@192.168.1.230' | |
alias mount-dev='sshfs root@192.168.1.230:/var/www /mnt/dev' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{* | |
Twig macro to display a pagination, aka page browser. | |
Usage : | |
First you have to import the macro using "import" : | |
{% from 'AcmeBundle:Default:Macro/pagebrowser.html.twig' import pagebrowser %} | |
Then, call the function : | |
{{ pagebrowser(route, routeParams, totalPages, currentPage, browserSize) }} | |
Where : | |
route : the list route that have the page param, usually 'app.request.attributes.get('_route')' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo ---BG---40---41---42---43---44---45---46---47 | |
for i in {30..37} # foreground | |
do | |
echo -n -e FG$i- | |
for j in {40..47} # background | |
do | |
echo -n -e '\E['$i';'$j'm foo\E[0m' | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
xinput disable `xinput list | grep "Touchscreen" | sed -E 's/^.*id=([0-9]+).*$/\1/'` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Deprecated, use gibo instead : https://github.com/simonwhitaker/gibo | |
/build/ | |
/composer.phar | |
vendor/* | |
app/bootstrap* | |
web/uploads/* | |
web/bundles/* | |
*/logs/* | |
*/cache/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class HackableObject { | |
protected $obj; | |
public function __construct($obj){ | |
$this->obj = $obj; | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Generate a true random integer. | |
* To be used as a rand() replacement as it behave exactly the same. | |
* | |
* int true_rand(void) | |
* int true_rand(int $min, int $max) | |
* | |
* It uses the HotBits webservice from FourmilLab as randomness provider | |
* based on radioactive decay. See https://www.fourmilab.ch/hotbits/. |
OlderNewer