Skip to content

Instantly share code, notes, and snippets.

View jbueza's full-sized avatar

Jaime Bueza jbueza

View GitHub Profile

(from http://www.joyceleong.com/log/installing-phantomjs-on-ubuntu/)

  1. cd ~
  2. wget http://phantomjs.googlecode.com/files/phantomjs-1.9.1-linux-x86_64.tar.bz2
  3. sudo mv ~/phantomjs-1.9.1-linux-x86_64.tar.bz2 /usr/local/share
  4. cd /usr/local/share
  5. sudo tar xvf phantomjs-1.9.1-linux-x86_64.tar.bz2
  6. sudo ln -s /usr/local/share/phantomjs-1.9.1-linux-x86_64 /usr/local/share/phantomjs
  7. sudo ln -s /usr/local/share/phantomjs/bin/phantomjs /usr/local/bin/phantomjs
  8. phantomjs --version
@jbueza
jbueza / mojo_jq_zepto_connector.js
Created August 11, 2011 17:26 — forked from steveluscher/mojo_dojo_connector.js
A Mojo->jQuery/Zepto connector; re-implement these methods in another library, and you can use Mojo 2.0 without Dojo.
/* Mojo-jQuery/Zepto connector */
(function() {
if(typeof mojo == 'undefined') mojo = {};
mojo.addOnUnload = jQuery.unload;
mojo.clone = dojo.clone; //TODO
mojo.config = dojo.config; //TODO
mojo.connect = jQuery.bind;
mojo.declare = dojo.declare; //via RequireJS? define()/require() AMD spec
mojo.destroyElement = jQuery.remove;
var express = require('express')
var app = express.createServer();
var contentHash = {'sha1:content' : 'your mom'};
app.configure(function() {
app.use(express.methodOverride())
app.use(express.bodyDecoder())
app.use(app.router)
});
@jbueza
jbueza / wtfcheck.js
Created November 25, 2010 12:27 — forked from bovan/wtfcheck.js
var data = $(document.body).data('trafikk');
$(data).each(function(index, value){
// filter function
$(data[index].ActualCounties).each(function(i, county){
// if road is in more than 1 county, iterate
if(!$.isArray(county.String )) county.String = [count.String];
data[index].include = (filter.indexOf(county.String.join()) < 0) ? false: true;
<div id="map_canvas" style="width: 400px; height: 600px"></div>
<script type="text/javascript">
jQuery(document).ready(function($){
// load the data
$.getScript('js/store.js', function() {
//this gets invoked after store.js loads
var myLatlng = new google.maps.LatLng(65.000, 16.500 );
var myOptions = {