Skip to content

Instantly share code, notes, and snippets.

@tobalsan
tobalsan / multiple_ssh_setting.md
Created November 3, 2012 19:32 — forked from jexchan/multiple_ssh_setting.md
SSH/Github: Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "your_email@youremail.com"
WP Bag of Tricks
1. Helpful Scripts/Plugins:
Hacks:
http://wordpress.org/extend/plugins/tac/
http://wordpress.org/extend/plugins/exploit-scanner/ (Can be extremely resource intensive.)
http://wordpress.org/extend/plugins/wp-malwatch/
@tobalsan
tobalsan / nginx-vhost.conf
Created August 19, 2013 23:56 — forked from tjstein/nginx-vhost.conf
Wordpress NGINX vhost configuration
upstream php-fpm {
server unix:/var/run/php5-fpm.sock;
}
server {
listen 80;
server_name www.example.com;
rewrite ^ http://example.com$request_uri?;
}

Grunt / Sass project

package.json

{
  "name": "My Project",
  "version": "1.0.0",
  "devDependencies": {
    "grunt": "~0.4.2",
    "grunt-contrib-watch": "~0.5.3",
#!/usr/bin/env bash
# Add dotdeb repos
echo >> /etc/apt/sources.list;
echo 'deb http://packages.dotdeb.org wheezy all' >> /etc/apt/sources.list
echo 'deb-src http://packages.dotdeb.org wheezy all' >> /etc/apt/sources.list
echo >> /etc/apt/sources.list;
echo 'deb http://packages.dotdeb.org wheezy-php55 all' >> /etc/apt/sources.list
echo 'deb-src http://packages.dotdeb.org wheezy-php55 all' >> /etc/apt/sources.list

Store PHP session in Redis

This example is based on a use with Silex, but it can be adapted to any other framework or plain PHP.

Fist, create the RedisSessionHandler.php class file:

<?php

class RedisSessionHandler implements SessionHandlerInterface
#!/bin/bash
if [ $# -lt 2 ]; then
echo "Please provide at least SOURCE and PATH LINK"
else
# By default (if no arguments passed) we create a junction in Winwdows
if [ "$1" == "-j" ] || [ "$1" != '-s' ]; then
case $1 in
"-j")
{dark||super||chat||the||simple||lol||go||rock|moi||zik|oh||serious||we||x}{maxence|luna|corentin|chloe|maxence|valentin|anthony|alexandra|adrian|amandine|carla|esteban|leonie|lisa|maiwenn|noah|zacharis|leo|bienvenue|matteo|baptiste|jade|lauriane|melissa|anais|valentine|kilian|mael|elena|leonard|francoise|eloise|maxence|renaud|valentin|francoise|chloe|maelle|lutecia|marwane|mehdi|zacharis|capucine|lena|maelle|manon|nina|romain|victor|alexis|katell|salome|ambre|oceane|loane|gregory|emile|melanie|benjamin|cedric|colin|maeva|clemence|carla|juliette|samuel|florian|romeo|colin|loane|mathieu|aaron|solene|renaud|julien|alexandra|malo|celia|elise|alexia|amandine|mehdi|amine|lena|maile|sarah|bruno|theo|fanny|lana|final|chocobo|saru|singe|marteau|beurre|levier|moto|racing|speed|nerv|cs|hl|lolita|expert|pro|geek|facile|paris|marketing|pub|blog|facto|sephiroth|cloud|ichigo|kon|lulla|anakin|jedi|smaug|legolas|aragorn|frodon|hobbit|bilbon|atlas|cafe|espresso|web|net|techno|gg}{01|fr||02|||03|||04|||05|||06|||07|||08|||09||
WP Bag of Tricks
1. Helpful Scripts/Plugins:
Hacks:
http://wordpress.org/extend/plugins/tac/
http://wordpress.org/extend/plugins/exploit-scanner/ (Can be extremely resource intensive.)
http://wordpress.org/extend/plugins/wp-malwatch/
#!/bin/bash
item=$1
# A directory or a file must be provided
if [ -z $item ]; then
echo "You must specify a file or a folder"
exit 0
elif [ ! -d $item ] && [ ! -f $item ]; then
echo "The entry you specified is not a folder or a file"