Skip to content

Instantly share code, notes, and snippets.

View timwaters's full-sized avatar
💭
Set your status

Tim Waters timwaters

💭
Set your status
View GitHub Profile
@timwaters
timwaters / gist:5717111
Last active December 18, 2015 03:19
nypl maps and hacks 2013 NYC New york public library
Robinsons Digitized features - buffered, coloured by user id
http://i.imgur.com/zGpIWhd.png
Manhatten Perris Map - coloured by user id
http://i.imgur.com/EnSVx4l.png
http://geocommons.com/maps/267360 - animated map of all the GCPS
@timwaters
timwaters / gist:5928831
Last active December 19, 2015 08:49
js drag droppable trees
* nestedsortable 600,192
** https://github.com/mjsarfatti/nestedSortable
** http://mjsarfatti.com/sandbox/nestedSortable/
** MIT
- extends jq ui sortable widget
- has built in export formats
* jsTree 933,230
@timwaters
timwaters / gist:6064651
Created July 23, 2013 18:01
heroku woes Invalid DATABASE_URL
tim@armadillo:~/projects/visualtags$ heroku pg:promote HEROKU_POSTGRESQL_COBALT
Promoting HEROKU_POSTGRESQL_COBALT_URL to DATABASE_URL... done
tim@armadillo:~/projects/visualtags$ git push heroku master
Counting objects: 72, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (51/51), done.
Writing objects: 100% (53/53), 625.67 KiB | 359 KiB/s, done.
Total 53 (delta 35), reused 0 (delta 0)
-----> Ruby/Rack app detected
# nypl_repo
A Ruby Gem for the New York Public Libraries Digital Collections Repository API at http://api.repo.nypl.org/
## Usage
```
token = "your_nypl_api_token"
client = NyplRepo::Client.new(token)
```
select osm_id, start_date, end_date from planet_osm_line where osm_id = '198099998' and start_date between '2008-01-01' and '2008-12-31';
@timwaters
timwaters / ubu_screen.rb
Created May 21, 2014 22:25
Ubuweb video mashup mix generation
#ubu web
#read sqlite
#get X random moves
#randomly clip them
#make new movie
require 'sqlite3'
require 'net/http'
db = SQLite3::Database.new( "UbuWeb.db" )
@timwaters
timwaters / E_Prime_NMI_leeds.txt
Created December 8, 2014 16:29
E-Prime for New Mechanics Institute - Leeds 8 Dec Identity and to be
E-PRIME, abolishing all forms of the verb "to be," has its roots in the field of general semantics, as presented by Alfred Korzybski in his 1933 book, Science and Sanity. Korzybski pointed out the pitfalls associated with, and produced by, two usages of "to be": identity and predication. Example of identity use would be "The Cat is George", "The Cat is a feline" or "Luke, I am your father" and predication would be "I am tired" and "The Cat is furry", "Luke is brave" etc.
Bourland pioneered in demonstrating that one can indeed write and speak without using any form of "to be," calling this subset of the English language "E-Prime." Many have urged the use of E-Prime in writing scientific and technical papers. I would say it helps when writing emails to mailing lists to help avoid miscommunication.
For example, instead of the sentence "the film was good", and the speaker might instead use E-Prime and say "I liked the film" or "the film made me laugh". The E-Prime versions communicate the speaker's experience

Experimental Generation of Interpersonal Closeness

Instructions to Subjects Included With Task Slips Packet

This is a study of interpersonal closeness, and your task, which we think will be quite enjoyable, is simply to get close to your partner. We believe that the best way for you to get close to your partner is for you to share with them and for them to share with you. Of course, when we advise you about getting close to your partner, we are giving advice regarding your behavior in this demonstration only, we are not advising you about your behavior outside of this demonstration.

In order to help you get close we've arranged for the two of you to engage in a kind of sharing game. You're sharing time will be for about one hour, after which time we ask you to fill out a questionnaire concerning your experience of getting close to your partner.

You have been given three sets of slips. Each slip has a question or a task written on it. As soon as you both finish reading these instructions, you should

@timwaters
timwaters / gist:3e90ab6beb65c3020f65
Created March 24, 2015 16:02
batch compressing and adding gdaloveviews to a directory of files
i=0
for file in *.tif; do
echo $((i++))
tmp_tiff=$(basename $file .tif)_deflate.tif
echo Compressing $file to $tmp_tiff
gdal_translate -co COMPRESS=deflate $file $tmp_tiff
echo Adding overviews to $tmp_tiff
gdaladdo -r average $tmp_tiff 2 4 8 16 32 64
echo rm and move to orig
mv $tmp_tiff $file
@timwaters
timwaters / gist:8066c9cbc743c916ea3b
Created April 17, 2015 18:29
compile mapserver 6.2 with ruby 2
6130 ./configure --with-gdal --with-ogr --with-tiff --with-geos --with-proj --with-png --with-aag --with-zlib
6131 make
6132 make mapscriptvars
6133 cd mapscript/ruby/
6134 ruby extconf.rb
6135 make
6136 cp mapscript.so ~/.rvm/rubies/ruby-2.2.1/lib/ruby/vendor_ruby/2.2.0/x86_64-linux/