Skip to content

Instantly share code, notes, and snippets.

View anabelle's full-sized avatar

Anabelle Handdoek anabelle

View GitHub Profile
@sd
sd / gist:4186998
Created December 2, 2012 04:40
Pan de Jamón a la Echeverría

Pan de Jamón (a la Echeverría)

Masa

  • 1 taza de leche tibia
  • 1 sobrecito de levadura (Fleishmann ActiveDry Yeast) Esperar 10 minutos a ver si la levadura levanta
@preshing
preshing / sort1mb.cpp
Created October 25, 2012 11:28
Sort one million 8-digit numbers in 1MB RAM
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
typedef unsigned int u32;
typedef unsigned long long u64;
//-------------------------------------------------------------------------
// WorkArea
//-------------------------------------------------------------------------
@anabelle
anabelle / palaproxima.sh
Created September 13, 2012 01:35
Lo que hice para poner a andar pip y virtualenv en crunchbang
# Instala paquetes necesarios
sudo apt-get install postgresql
sudo apt-get install postgresql-server-dev-9.1
sudo apt-get install python-pip
sudo apt-get install python-dev
sudo pip install virtualenv
sudo pip install virtualenvwrapper
# Crea y activa entorno virtual
virtualenv <nombre_proyecto>
@johnpolacek
johnpolacek / jquery-plugin-boilerplate
Created August 21, 2012 15:06
jQuery Plugin Boilerplate
/*
PluginName - Plug In Description
by John Polacek (@johnpolacek)
Dual licensed under MIT and GPL.
Dependencies: jQuery
*/
;(function($) {
@carstingaxion
carstingaxion / ee2wp.export.xml
Created July 8, 2012 12:05
ExpressionEngine to WordPress Export Template
<?xml version="1.0" encoding="UTF-8" ?>
<!-- To import this information into a WordPress site follow these steps: -->
<!--RUN THIS FILE IN FIREFOX OR IE-->
<!--VIEW PAGE SOURCE-->
<!--COPY-PASTE PAGE SOURCE INTO TEXT EDITOR AND SAVE AS .WXR FILE-->
<!--REMOVE "?'s" FROM XML VERSION AT TOP OF THIS PAGE-->
<!--COMMENT OUT LINE 1309, 1310, 1311 IN wp-includes/kses.php -->
<!--THEN FOLLOW THE STEPS BELOW-->
@ssoper
ssoper / app.js
Created June 19, 2012 21:43
Run Kue alongside another Express server using a different path
// Assumes you want to run a kue server on port 3001 with the path '/kue'.
// Use a proxy like nginx to send the requests to the appropriate URL.
require lodash = require('lodash'),
kue = require('kue');
// Prepend the Kue routes with '/kue'
lodash.each(['get', 'put', 'delete'], function(verb) {
lodash.each(kue.app.routes.routes[verb], function(route, index, routes) {
routes[index].path = '/kue' + route.path;
@anabelle
anabelle / update-wpdb.sql
Created May 11, 2012 06:04
Update WP database after migration to new domain
UPDATE wp_options SET option_value = replace(option_value, 'http://old.tld', 'http://new.tld') WHERE option_name = 'home' OR option_name = 'siteurl';
UPDATE wp_posts SET guid = replace(guid, 'http://old.tld','http://new.tld');
UPDATE wp_posts SET post_content = replace(post_content, 'http://old.tld', 'http://new.tld');
find . -type d -print0 | xargs -0 chmod 0755 # For directories
find . -type f -print0 | xargs -0 chmod 0644 # For files
@Mantish
Mantish / sticky-title.js
Last active September 29, 2015 00:48
jQuery plugin to have divs stick to the top of the screen (or at some distance from the top), once scrolled by.
(function($)
{
$.fn.stickytitle = function(options)
{
var opts = $.extend($.fn.stickytitle.defaults, options);
var elements = this, starting_offsets = new Array();
elements.each(function(index){
//before anything happens, the original top offsets of each element are saved
starting_offsets[index] = $(this).offset().top;
});
@anabelle
anabelle / sshadd.sh
Created December 25, 2011 01:58
add ssh key to server
# Agregar esto a .bashrc o a .bash_aliases
# Uso: add_ssh [email protected]
function add_ssh {
cat ~/.ssh/id_rsa.pub | ssh $1 'cat >> .ssh/authorized_keys'
}
export -f add_ssh