Skip to content

Instantly share code, notes, and snippets.

View jufemaiz's full-sized avatar
🔌
CTO at @enosi

Joel Courtney jufemaiz

🔌
CTO at @enosi
View GitHub Profile
@jufemaiz
jufemaiz / ruby-processing » MovieMaker failing » output
Created February 23, 2011 23:49
Ruby-processing + MovieMaker not working :(
java.lang.reflect.InvocationTargetException
at java.awt.EventQueue.invokeAndWait(EventQueue.java:1034)
at quicktime.QTSession.<clinit>(QTSession.java:94)
at quicktime.util.QTUtils.<clinit>(QTUtils.java:33)
at processing.video.MovieMaker.<clinit>(MovieMaker.java:110)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:247)
at org.jruby.javasupport.JavaSupport.loadJavaClass(JavaSupport.java:147)
at org.jruby.javasupport.JavaSupport.loadJavaClassVerbose(JavaSupport.java:156)
at org.jruby.javasupport.JavaClass.forNameVerbose(JavaClass.java:944)
@jufemaiz
jufemaiz / Flickr Flash Slideshow Embed Code.html
Created March 22, 2011 02:22
Code for allowing the embedding of Flickr's Flash based Slideshow.
<object width="400" height="300">
<param name="flashvars" value="offsite=true&lang=en-us&page_show_url=%2Fphotos%2F{USERNAME}%2Fsets%2F{SET_ID}%2Fshow%2F&page_show_back_url=%2Fphotos%2F{USERNAME}%2Fsets%2F{SET_ID}%2F&set_id={SET_ID}&jump_to="></param>
<param name="movie" value="http://www.flickr.com/apps/slideshow/show.swf?v=71649"></param>
<param name="allowFullScreen" value="true"></param>
<embed type="application/x-shockwave-flash" src="http://www.flickr.com/apps/slideshow/show.swf?v=71649" allowFullScreen="true" flashvars="offsite=true&lang=en-us&page_show_url=%2Fphotos%2F{USERNAME}%2Fsets%2F{SET_ID}%2Fshow%2F&page_show_back_url=%2Fphotos%2F{USERNAME}%2Fsets%2F{SET_ID}%2F&set_id={SET_ID}&jump_to=" width="400" height="300"></embed>
</object>
<!--
Replace the following:
@jufemaiz
jufemaiz / backup_fpt_db.sh
Created March 8, 2012 03:26
Backup of the MySQL Database Shell Script
#!/bin/bash
# Backup of the MySQL Database
mysqldump -u $DATABASE_USER -p $DATABASE_NAME |gzip ->$(date +%Y%m%d%H%M%S)_ftp_db.sql.gz
@jufemaiz
jufemaiz / danny-navigation.html
Created April 17, 2012 12:07
Navigation - Resize elements to fit space with even padding around them
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Testing the Awesomeness</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
<!-- Le styles -->
times prices status: base power: base status: peaker power: peaker power: wind load power: Ireland
2010-04-27 00:00:00 30.0 1.0 2197.0 -0.0 0.0 303 2500
2010-04-27 00:15:00 30.0 1.0 2178.0 1.0 0.0 311 2489
2010-04-27 00:30:00 30.0 1.0 2092.0 1.0 0.0 340 2432
2010-04-27 00:45:00 30.0 1.0 2012.0 1.0 0.0 360 2372
2010-04-27 01:00:00 30.0 1.0 1975.0 1.0 0.0 345 2320
2010-04-27 01:15:00 30.0 1.0 1918.0 1.0 0.0 348 2266
2010-04-27 01:30:00 30.0 1.0 1824.0 1.0 0.0 411 2235
2010-04-27 01:45:00 30.0 1.0 1804.0 1.0 0.0 405 2209
2010-04-27 02:00:00 30.0 1.0 1759.0 1.0 0.0 411 2170
<!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Colin's Questions</title>
<meta name="description" content="">
@jufemaiz
jufemaiz / histogram_table_timeofday.js
Created August 14, 2013 01:49
Inserts a table based histogram of time data from an object data of structure { 'time_of_day':value }
// Inserts a table based histogram of time data from an object data of structure { 'time_of_day':value }
// @param data[Object] Time of day data object data of structure { 'time_of_day':value }
// @param string|node Node to append to
// @return jQuery[Object] the table's jquery object.
function histogram_table_timeofday(data,parentNode) {
var le_table = $('<table id="histogram" style="width: 100%"><thead><tr><th scope="col" style="width: 40px;">Time of Day</th><th scope="col">Count</th></thead><tbody></tbody></table>');
var max = 0;
for(var key in data) {
if(data[key] > max) { max = data[key]; }
}
$("ol.stream-items").bind("DOMSubtreeModified", function() {
alert('Subtree modified');
$('li.stream-item').each(
function(i,el){
if( undefined !== $(el).children('.tweet').attr('data-retweeter') ) {
$(el).css('display','none').addClass('retweet-quiet');
}
}
);
});
@jufemaiz
jufemaiz / envvars
Created May 8, 2014 01:58
AWS EC2 Elastic Beanstalk Instance (Ruby Puma)
# /opt/elasticbeanstalk/containerfiles/envvars
# Default environment variables for Elastic Beanstalk
export EB_ROOT=/opt/elasticbeanstalk
export EB_CONFIG_FILE=$EB_ROOT/deploy/configuration/containerconfiguration
export EB_CONFIG_SOURCE_BUNDLE=$EB_ROOT/deploy/appsource/source_bundle
export EB_CONFIG_APP_BASE=/var/app
export EB_CONFIG_APP_SUPPORT=$EB_CONFIG_APP_BASE/containerfiles
export EB_CONFIG_APP_ONDECK=$EB_CONFIG_APP_BASE/ondeck
export EB_CONFIG_APP_CURRENT=$EB_CONFIG_APP_BASE/current