Skip to content

Instantly share code, notes, and snippets.

maximevalette /
Last active August 29, 2015 14:03 — forked from bsag/

Instructions for setting up Octopress to ping FeedPress

FeedPress checks at regular intervals (about once an hour, 20 minutes for Premium users) to check whether your Octopress Atom or RSS feed has been updated. However, if you'd like to notify FeedPress as soon as you publish, and you have a Premium FeedPress account, you can set up Octopress to ping FeedPress when you deploy.


  1. You use Octopress
  2. You use FeedPress to manage your Octopress Atom or RSS feed and have a Premium FeedPress account

Setting up

maximevalette / apache2.conf
Created December 12, 2010 12:06
My /etc/apache2/apache2.conf
View apache2.conf
### Section 1: Global Environment
ServerRoot "/etc/apache2"
LockFile /var/lock/apache2/accept.lock
PidFile /var/run/
Timeout 100
KeepAlive Off
MaxKeepAliveRequests 200
KeepAliveTimeout 4
ServerLimit 256
maximevalette / gist:754421
Created December 24, 2010 17:49
Replace a string in multiple files at once
View gist:754421
for i in `find . -name '*.txt'`; do vim -c "%s/toreplace/replaced/g | x" "$i"; done
maximevalette / gist:758937
Last active September 24, 2015 13:58
Slugify string
View gist:758937
function urlcompliant($nompage) {
$a = array('À','Á','Â','Ã','Ä','Å','Æ','Ç','È','É','Ê','Ë','Ì','Í','Î','Ï','Ð','Ñ','Ò','Ó','Ô','Õ','Ö','Ø','Ù','Ú','Û','Ü','Ý','ß','à','á','â','ã','ä','å','æ','ç','è','é','ê','ë','ì','í','î','ï','ñ','ò','ó','ô','õ','ö','ø','ù','ú','û','ü','ý','ÿ','A','a','A','a','A','a','C','c','C','c','C','c','C','c','D','d','Ð','d','E','e','E','e','E','e','E','e','E','e','G','g','G','g','G','g','G','g','H','h','H','h','I','i','I','i','I','i','I','i','I','i','','','J','j','K','k','L','l','L','l','L','l','','','L','l','N','n','N','n','N','n','','O','o','O','o','O','o','Œ','œ','R','r','R','r','R','r','S','s','S','s','S','s','Š','š','T','t','T','t','T','t','U','u','U','u','U','u','U','u','U','u','U','u','W','w','Y','y','Ÿ','Z','z','Z','z','Ž','ž','','ƒ','O','o','U','u','A','a','I','i','O','o','U','u','U','u','U','u','U','u','U','u','','','','','','','€','@','Š','¡');
$b = array('A','A','A','A','A','A','AE','C','E','E','E','E','I','I','I','I','D','N','O','O','O','O','O','O','U','U','U
maximevalette / xdebug.ini
Created March 12, 2011 19:11
PHP Xdebug configuration file
View xdebug.ini
xdebug.remote_enable = 1
xdebug.remote_host = localhost
xdebug.remote_port = 9000
xdebug.idekey = "tacrukjallaistefilermonide"
xdebug.remote_connect_back = 1
maximevalette / client.conf
Created March 14, 2011 09:21
OpenVPN basic client.conf
View client.conf
# ca.crt
# client.crt
# client.key
dev tap
proto tcp
remote IP PORT
maximevalette / getLanguage.php
Created March 16, 2011 10:05
Retourne la langue préférée du navigateur.
View getLanguage.php
* Retourne la langue préférée du navigateur.
* @return string
function getLanguage() {
maximevalette / cache.php
Created March 16, 2011 11:55
Fonctions pour gérer un memcache facilement avec MySQL
View cache.php
* Exemple de variables Memcache
* Il faut absolument configurer le common name, pour pas faire de collision entre données
* si on a plusieurs sites avec le même Memcache.
$memcache = new Memcache();
maximevalette / xhrdie.php
Created April 6, 2011 14:33
Allow scripts to "die" following the HTTP Request type (AJAX or not)
View xhrdie.php
* Allow scripts to "die" following the HTTP Request type (AJAX or not)
* @param $msg Message to send if sent through AJAX
* @return void
function xhrDie($msg) {
$headers = apache_request_headers();
maximevalette / xmljson.php
Created April 18, 2011 11:56
Un snippet pour sortir un tableau
View xmljson.php
* @var array $data Le tableau qu'on veut sortir en XML ou JSON(P)
* @var (xml|json) $format Le format de sortie désiré
* @var string $callback Le nom de la fonction à appeler si on veut faire du JSONP
$data = array();
$format = 'xml';