Skip to content

Instantly share code, notes, and snippets.

View cassioeskelsen's full-sized avatar
🏠
Working from home

Cassio Rogerio Eskelsen cassioeskelsen

🏠
Working from home
  • Unico IDTech
  • Blumenau, SC, Brazil
  • 20:43 (UTC -03:00)
  • X @sricanesh
View GitHub Profile
@cassioeskelsen
cassioeskelsen / gist:1272314
Created October 8, 2011 13:58 — forked from caged/gist:1173725
d3.js experiment - Donuts, Bars and Crime.
#
# CoffeeScript for http://dealloc.me/demos/crime/2011.html
# Copyright (c) 2011 Justin Palmer <http://github.com/Caged>
# LICENSE: http://www.opensource.org/licenses/mit-license.php
$ ->
hash = document.location.hash
year = if hash then hash.replace('#', '') else 2011
[pt,pl,pb,pr] = [35, 20, 20, 20]
w = (900 - (pl + pr)) / 2
h = w
@cassioeskelsen
cassioeskelsen / dart.txt
Created October 10, 2011 12:46 — forked from paulmillr/dart.md
Leaked internal google dart email
---------- Forwarded message ----------
From: Mark S. Miller <[email protected]>
Date: Tue, Nov 16, 2010 at 3:44 PM
Subject: "Future of Javascript" doc from our internal "JavaScript Summit"
last week
To: [email protected]
On November 10th and 11th, a number of Google teams representing a variety
of viewpoints on client-side languages met to agree on a common vision for
the future of Javascript.
@cassioeskelsen
cassioeskelsen / index.html
Created April 16, 2012 19:37 — forked from tristen/index.html
Wax interactivity with location interaction
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>Wax Interactivity</title>
</head>
<body>
<style>
#map {
width: 100%;
<div id="wax-legend-census">
<a href="http://www.npr.org"><img src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASwAAABICAYAAABMb8iNAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAN1wAADdcBQiibeAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAABEWSURBVHic7Z15mFTVlcB/txtosGnRccEgKCCbsqhpRtAoYiaKTtoYdcBMoubDITioE3WCM9Fx1Ig6CaMBiUTFBUREJkxI7OAygwuYBAYRkSjKIgqIEBoXGrqhF7ru/HFuUbdevep+1RZ5BZz7fe+r3zt13nmnblWd767nAfSx1mKtRVlZWbmgOXYHlJWVlSNy7A4oKysrR+XYHVBWVlaOzLE7oKysrByRY3dAWVlZOSrH7oCysrJyZI7dAWVlZeWIHLsDysrKylE5dgeUlZWVI3PsDigrKytH5NgdUFZWVo7KsTugrKysHJljd0BZWVk5IueifA0w2R2PAsXAaOAlYC7w92HXAhXATGAB8DDwY6DYvffXns2ngJ5OPhR4xB0Pezav9PQnefIRwHigEpgD/BA4ulAqWVlZOT8cWRm4E7Du2AX81jtPHrd5+u2BZ0N0LPAaMMTpbvLkN7lrrwnod3fyZzzZk4ABns9yjz3ANwqhkpWVlfPEUZVJD1jZjhrgZKd/X+C9LYHzmU7PD0KvOtlvArr3OPmfPdklSIsreZ4AXgdq3flGJGjGX8nKysp54VyUp5AeRF4AfgB8FJCfhHTH9nqyW52NYZ6sCfgbpDuXlFUDHYHdAZsvAwO9893AqcC1nmwj0pUcBHwLOK9QKllZWTk/HFmZ9BZWE3Cck48mPbicBlztnTcAtyFjV/cDn3rvXQq0I9UqssDUgL2kjV945684v4aG6K4BbgBOK5RKVlZWzhNHVSY9YO3w5OeSHjAuAa4iM5CEHf+M
@cassioeskelsen
cassioeskelsen / archive_tweets.py
Created July 31, 2012 21:52 — forked from tmcw/archive_tweets.py
Archive Tweets
import requests, os, glob, json
you = 'tmcw'
data = 'tweets'
try: os.mkdir(data)
except Exception: pass
def run(max_id = False):
already = glob.glob("%s/*.json" % data)
@cassioeskelsen
cassioeskelsen / import.sh
Created October 24, 2012 22:30 — forked from nvkelso/import.sh
Importing SHPs of Windows 1252 into UTF PostGIS using ORG's PostGIS driver (not shp2pgsql)
#!/bin/bash
# loop through all of the shapefiles in the directory and act on them
# http://trac.osgeo.org/gdal/wiki/FAQVector#HowcanImergehundredsofShapefiles
# http://stackoverflow.com/questions/965053/extract-filename-and-extension-in-bash
# !IMPORTANT: OGR 1.9 for direct to PostGIS support, linestring-multilinestring, and character encoding support.
if [ $# -ne 1 ]; then
echo "USAGE: ./import.sh <in_dir_path>"
@cassioeskelsen
cassioeskelsen / timelapse.py
Created November 25, 2012 23:21 — forked from lrvick/timelapse.py
Simple script to run a timelapse on a canon camera from a raspberry pi with an attached HD44780 display
from hd44780 import HD44780
import ctypes
from time import sleep
class CameraFilePath(ctypes.Structure):
_fields_ = [('name', (ctypes.c_char * 128)),
('folder', (ctypes.c_char * 1024))]
gp = ctypes.CDLL('libgphoto2.so.2')
# Some good references are:
# http://russbrooks.com/2010/11/25/install-postgresql-9-on-os-x
# http://www.paolocorti.net/2008/01/30/installing-postgis-on-ubuntu/
# http://postgis.refractions.net/documentation/manual-1.5/ch02.html#id2630392
#1. Install PostgreSQL postgis and postgres
brew install postgis
initdb /usr/local/var/postgres
pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start
#!/bin/bash
#
# Install Postgres 9.1, PostGIS 2.0 and pgRouting on a clean Ubuntu 12.04 install (64 bit)
# updated to PostGIS 2.0.1
# basics
apt-get install python-software-properties
apt-add-repository ppa:sharpie/for-science # To get GEOS 3.3.3
# install the following pacakages
#!/bin/bash
#
# Install Postgres 9.2 on a clean Ubuntu 12.04
"""
LC_ALL issue
comment out the AcceptEnv LANG LC_* line in the remote /etc/ssh/sshd_config file.
sudo apt-get install language-pack-en-base
sudo dpkg-reconfigure locales
comment out the SendEnv LANG LC_* line in the local /etc/ssh/ssh_config file.