Skip to content

Instantly share code, notes, and snippets.

View anabelle's full-sized avatar

Anabelle Handdoek anabelle

View GitHub Profile
@anabelle
anabelle / f-update-grub.sh
Created January 25, 2012 14:34
Update grub in fedora
sudo grub2-mkconfig -o /boot/grub2/grub.cfg
find . -type d -print0 | xargs -0 chmod 0755 # For directories
find . -type f -print0 | xargs -0 chmod 0644 # For files
<?php
/* Designer randomnes */
if($es_texto == 0 && $texto == 0){
$es_texto = rand(0, 1);
}else{
$es_texto = 0;
}
if($imagen == 2){
$es_texto = 1;
}
@anabelle
anabelle / archive-diff.php
Created May 3, 2012 16:36
Change wordpress post per page limit in a template
<?php
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
query_posts($query_string .'&posts_per_page=12&paged=' . $paged);
?>
@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');
@anabelle
anabelle / .gitignore
Created September 4, 2012 18:04
The last .gitignore in h5bp
# Read about how to use .gitignore: http://h5bp.com/ae
# Numerous always-ignore extensions
*.diff
*.err
*.orig
*.log
*.rej
*.swo
*.swp
@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>
<div
data-title="El Parlante Amarillo"
data-link="http://elparlanteamarillo.com/"
data-embed-feed="http://elparlanteamarillo.com/feed/">&nbsp;</div>
<script>
window.EMBED_FEED_JQUERY_SRC = 'libs/jquery.js',
window.EMBED_FEED_JQUERY_FEEDS_SRC = 'libs/jquery.feeds.js';
</script>
<script src="src/embed-feed.js"></script>
#!/bin/sh
#
# SIM 3.0 [sim@r-fx.org]
###
# Copyright (C) 1999-2005, R-fx Networks <sim@r-fx.org>
# Copyright (C) 2005, Ryan MacDonald <ryan@r-fx.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or