Skip to content

Instantly share code, notes, and snippets.

View tzkmx's full-sized avatar
🎉
estrenando repositorios privados

Jesus Franco tzkmx

🎉
estrenando repositorios privados
View GitHub Profile
@schacon
schacon / gist:942899
Created April 26, 2011 19:19
delete all remote branches that have already been merged into master
$ git branch -r --merged |
grep origin |
grep -v '>' |
grep -v master |
xargs -L1 |
awk '{split($0,a,"/"); print a[2]}' |
xargs git push origin --delete
@bueltge
bueltge / wp-hooks-filter.php
Created May 31, 2011 08:07
Instruments Hooks for a Page of WordPress. Outputs during the Shutdown Hook after add get-params: ?instrument=hooks
<?php
/*
Plugin Name: Instrument Hooks for WordPress
Plugin URI: http://bueltge.de/
Description: Instruments Hooks for a Page. Outputs during the Shutdown Hook after add get-params <code>?instrument=hooks</code>.
Version: 0.0.1
Author: Frank B&uuml;ltge
Author URI: http://bueltge.de/
*/
@derpixler
derpixler / wp-hooks-filter.php
Created October 4, 2011 08:37 — forked from bueltge/wp-hooks-filter.php
Instruments Hooks for a Page of WordPress. Outputs during the Shutdown Hook after add get-params: ?instrument=hooks
<?php
/*
Plugin Name: Instrument Hooks for WordPress
Plugin URI: http://bueltge.de/
Description: Instruments Hooks for a Page. Outputs during the Shutdown Hook after add get-params <code>?instrument=hooks</code>.
Version: 0.0.1
Author: Frank B&uuml;ltge
Author URI: http://bueltge.de/
*/
@johnpbloch
johnpbloch / query-thief.php
Created November 18, 2011 17:11
Hijacking the main WordPress query and loop for fun and profit
<?php
/*
* Plugin Name: Query Thief
* Description: Hijacking the main WordPress query and loop for fun and profit
* Version: 0.1
*/
// I namespace everything now that PHP 5.2.4 is the minimum requirement. :D
namespace JPB;
@hSATAC
hSATAC / .vimrc
Created December 19, 2011 09:05
runtime php syntax check without saving file
set errorformat=%m\ in\ %f\ on\ line\ %l
if !exists('*PHPsynCHK')
function! PHPsynCHK()
ccl
let winnum = winnr()
let linenum = line('.')
let colnum = col('.')
silent execute "%!php -l -f /dev/stdin | sed 's/\\/dev\\/stdin/".bufname("%")."/g' >.vimerr; cat"
silent cf .vimerr
cw
@jlongster
jlongster / gist:1712455
Created January 31, 2012 19:37
traditional lisp macros
;; outlet code for implementing traditional macro expansion
;; macros
(define (expand form)
(cond
((variable? form) form)
((literal? form) form)
((macro? (car form))
(expand ((macro-function (car form)) form)))
@xeoncross
xeoncross / Requests.php
Created April 11, 2012 21:44
cURL asynchronous requests using curl_multi and callbacks
<?php
/**
* Make asynchronous requests to different resources as fast as possible and process the results as they are ready.
*/
class Requests
{
public $handle;
public function __construct()
{
@jreinke
jreinke / generate.php
Created August 14, 2012 14:45
Default password encoding in Silex micro-framework
<?php
use Symfony\Component\Security\Core\Encoder\MessageDigestPasswordEncoder;
$encoder = new MessageDigestPasswordEncoder();
echo $encoder->encodePassword('foo', '');
// 5FZ2Z8QIkA7UTZ4BYkoC+GsReLf569mSKDsfods6LYQ8t+a8EW9oaircfMpmaLbPBh4FOBiiFyLfuZmTSUwzZg==
@Integralist
Integralist / 1. elements.html
Created November 20, 2012 08:41
The Checkbox CSS Hack (doesn't work in IE <= 8, but all other browsers fine)
<label for="toggle-1">I'm a toggle</label>
<input type="checkbox" id="toggle-1">
<div>I'm controlled by toggle. No JavaScript!</div>
@TeMPOraL
TeMPOraL / regenerate.lisp
Created December 2, 2012 19:43
A static page generator
;;;; regenerate.lisp - script for regenerating [redacted] static HTML from template files.
(ql:quickload "cl-emb")
(ql:quickload "cl-fad")
(ql:quickload "cl-ppcre")
(defparameter *configuration* '() "plist containing config parameters passed to EMB templates.")
(defparameter *essays* '() "plist containing essay descriptors generated by `defessay'.")
(defconstant +default-properties+ '(:title nil :url nil :orig-title nil :orig-url nil :date nil :orig-date nil :alt-translations nil :translators nil :editors nil :disabled nil :additional-html nil :part-of-hnp nil :description ""))