Skip to content

Instantly share code, notes, and snippets.

View aeurielesn's full-sized avatar

Alexander Urieles aeurielesn

View GitHub Profile
@aeurielesn
aeurielesn / dice-portrait.py
Last active September 28, 2015 03:38
spmacdonald's dice portrait
# http://web.archive.org/web/20091015013516/http://www.elusivesnark.com/2008/11/carolines-dice-portrait.html
PImage img;
PImage cropped_img;
PImage patch;
int _width = 640;
int _height = 1024;
int patch_w = 16;
int patch_h = 16;
@aeurielesn
aeurielesn / gist:1502169
Created December 20, 2011 16:27
Installing Oracle Java Plugin in Ubuntu 11.04
sudo apt-get install sun-java6-plugin
sudo update-alternatives --install /usr/lib/mozilla/plugins/mozilla-javaplugin.so mozilla-javaplugin.so /usr/lib/jvm/java-6-sun/jre/lib/i386/libnpjp2.so 1
@aeurielesn
aeurielesn / jquery.tabs.js
Created February 22, 2012 21:13
Modified jquery tab plugin to allow subtabs
$(".tabs").tabs();
@aeurielesn
aeurielesn / backup.sh
Created April 5, 2012 21:03
Backup through FTP
#!/bin/bash -e
#
#Define dumpfile name
MYSQLBACKUP= /tmp/dbackup
#Perform MySQL dump
#Replace appropriate USER, PASSWORD and paths to mysqldump, socket, etc.
#Drop in you preferred method - tar versus gzip, etc.
/usr/bin/mysqldump --all-databases -S /tmp/mysql.sock -uUSER -pPASSWORD | gzip -c > $MYSQLBACKUP
@aeurielesn
aeurielesn / gist:2376289
Created April 13, 2012 11:51
Find features referencing a plugin
osgi> provlquery /eclipse/p2/org.eclipse.equinox.p2.engine/profileRegistry/SDKProfile.profile "select(parent | parent.properties['org.eclipse.equinox.p2.type.group'] == true && parent.requirements.exists(rc | everything.exists(iu | iu.id == 'org.eclipse.core.filesystem' && iu ~= rc)))" true
@aeurielesn
aeurielesn / gist:2511005
Created April 27, 2012 17:23
Retrying a jQuery.ajax() call
$.ajax({
url: '/echo/error/',
async: true,
// retryCount and retryLimit will let you retry a determined number of times
retryCount: 0,
retryLimit: 10,
// retryTimeout limits the total time retrying (in milliseconds)
retryTimeout: 10000,
// timeout for each request
timeout: 1000,