Skip to content

Instantly share code, notes, and snippets.

View euskadi31's full-sized avatar
🚀
Focusing

Axel Etcheverry euskadi31

🚀
Focusing
View GitHub Profile
@chanmix51
chanmix51 / app.nginx.conf
Created August 17, 2011 08:45
nginx vhost conf silex & symfony
server {
listen 80;
server_name server.mydomain.net
root /var/www/app/web;
index index.php;
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include fastcgi_params;
@kylelemons
kylelemons / Makefile
Created October 20, 2011 18:27
A Makefile for protocol buffers in Go
include $(GOROOT)/src/Make.inc
PROTOFILES=$(wildcard *.proto)
GOPROTOFILES=$(patsubst %.proto,%.pb.go,$(PROTOFILES))
TARG=protopackage
GOFILES=\
$(GOPROTOFILES)\
CLEANFILES+=$(GOPROTOFILES)
@phpdude
phpdude / nginx.conf
Last active February 28, 2024 04:36
Nginx image filter + caching of results.
location /resize {
alias /tmp/nginx/resize;
set $width 150;
set $height 100;
set $dimens "";
if ($uri ~* "^/resize_(\d+)x(\d+)/(.*)" ) {
set $width $1;
set $height $2;
set $image_path $3;
@naholyr
naholyr / decode_live.free.fr.sh
Created January 5, 2012 09:55
Decode MD5 from live.free.fr
#!/bin/bash
# <troll>If you don't have bash, go get a real OS.</troll>
curl -s "http://md5.noisette.ch/md5.php?hash=$(curl -s http://live.free.fr | gunzip | tail -n 36 | head -n 32 | grep '[a-f0-9]' -o | xargs echo -n | sed 's/ //g')" | grep '<string>' | sed 's/^.*\[CDATA\[\(.*\)\]\].*$/\1/'
@ziadoz
ziadoz / awesome-php.md
Last active July 13, 2024 05:29
Awesome PHP — A curated list of amazingly awesome PHP libraries, resources and shiny things.
@chanmix51
chanmix51 / objects.sql
Created February 19, 2012 12:38
How to deal with objects in Postgresql
SELECT author FROM author;
| author |
+-------------------+
| "(1,'john doe')" |
+-------------------+
| "(2,'Edgar')" |
+-------------------+
SELECT
author.id,

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

@tobyhede
tobyhede / postsql.sql
Created May 17, 2012 03:08
PostgreSQL as JSON Document Store
-- PostgreSQL 9.2 beta (for the new JSON datatype)
-- You can actually use an earlier version and a TEXT type too
-- PL/V8 http://code.google.com/p/plv8js/wiki/PLV8
-- Inspired by
-- http://people.planetpostgresql.org/andrew/index.php?/archives/249-Using-PLV8-to-index-JSON.html
-- http://ssql-pgaustin.herokuapp.com/#1
-- JSON Types need to be mapped into corresponding PG types
--
@raphaelstolt
raphaelstolt / php54_php53_pear_macports.markdown
Created May 17, 2012 21:37
Installing PHP 5.4 and 5.3 side by side on Max OSX via MacPorts

##Given Apache 2 and MySQL are already installed.

#Update MacPorts sudo port selfupdate;sudo port -u upgrade outdated

#Install PHP 5.4.* sudo port install php54 php54-apache2handler ##Activate Apache Module cd /opt/local/apache2/modules

@eirikbacker
eirikbacker / addEventListener-polyfill.js
Created June 3, 2012 19:30
addEventListener polyfill for IE6+
//addEventListener polyfill 1.0 / Eirik Backer / MIT Licence
(function(win, doc){
if(win.addEventListener)return; //No need to polyfill
function docHijack(p){var old = doc[p];doc[p] = function(v){return addListen(old(v))}}
function addEvent(on, fn, self){
return (self = this).attachEvent('on' + on, function(e){
var e = e || win.event;
e.preventDefault = e.preventDefault || function(){e.returnValue = false}
e.stopPropagation = e.stopPropagation || function(){e.cancelBubble = true}