Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View tbuckl's full-sized avatar
Studying

Tom Buckley tbuckl

Studying
View GitHub Profile
@jcheng5
jcheng5 / README.md
Last active December 15, 2022 16:01
Using arbitrary Leaflet plugins with Leaflet for R

Using arbitrary Leaflet JS plugins with Leaflet for R

The Leaflet JS mapping library has lots of plugins available. The Leaflet package for R provides direct support for some, but far from all, of these plugins, by providing R functions for invoking the plugins.

If you as an R user find yourself wanting to use a Leaflet plugin that isn't directly supported in the R package, you can use the technique shown here to load the plugin yourself and invoke it using JS code.

@techieshark
techieshark / lots-o-git.sh
Created January 29, 2015 03:19
Cleaning Mesa's downstream repo / syncing with CfA
# This is kind of long. It should be a lot simpler in the future, once these steps are done.
# Clone repo:
git clone https://github.com/CityOfMesaAZ/MuniciPal.git mesa-municipal
# get into repo
cd mesa-municipal
# Add the upstream repository:
git remote add upstream https://github.com/codeforamerica/MuniciPal.git
@ungoldman
ungoldman / index.html
Last active May 21, 2017 19:02
terraformer example
<script src="https://rawgit.com/Esri/Terraformer/master/terraformer.js"></script>
<script src="https://rawgit.com/Esri/terraformer-arcgis-parser/master/terraformer-arcgis-parser.js"></script>
<!-- CDN or locally hosted is ideal but I'm using raw github so that we get error reporting within the unminified source
<script src="http://cdn-geoweb.s3.amazonaws.com/terraformer/1.0.4/terraformer.min.js"></script>
<script src="http://cdn-geoweb.s3.amazonaws.com/terraformer-arcgis-parser/1.0.4/terraformer-arcgis-parser.min.js"></script>
-->
<script>
var input = {
"x": -66.796875,
"y": 20.0390625,

Stealing WiFi

/etc/hosts

This will let you access any google owned site. This includes: youtube, google cache, google translate, google search, gmail, google news, etc.

  • Install the HTTPS Everywhere extension
  • Add these rules to your /etc/hosts file
@spara
spara / big-ignite.html
Created May 5, 2014 07:32
Src for big with ignite style timer
<!DOCTYPE html>
<html>
<head>
<title></title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
<style type='text/css'>
body {
background:#000;
color:#fff;
@levity
levity / mosql.rake
Created March 25, 2014 22:55
Rake task for MoSQL on Heroku
# This is a simplified version of what we're using in production for drinksoma.com
namespace :mosql do
task :run => :environment do
conf_path = Rails.root.join('config', 'collections.yml')
cmd = "mosql -c #{conf_path} --sql #{ENV['MOSQL_POSTGRES_URI']} --mongo #{ENV['MOSQL_MONGO_URI']}"
IO.popen(cmd) do |child|
trap('TERM') { Process.kill 'INT', child.pid }
$stdout.sync = true
@wolever
wolever / histogram.sql
Last active April 19, 2023 20:28
Functions to create and draw histograms with PostgreSQL.
-- Functions to create and draw histograms with PostgreSQL.
--
-- psql# WITH email_lengths AS (
-- -# SELECT length(email) AS length
-- -# FROM auth_user
-- -# LIMIT 100
-- -# )
-- -# SELECT * FROM show_histogram((SELECT histogram(length, 0, 32, 6) FROM email_lengths))
-- bucket | range | count | bar | cumbar | cumsum | cumpct
-- --------+-------------------------------------+-------+--------------------------------+--------------------------------+--------+------------------------
@josecarlosgonz
josecarlosgonz / GoogleMapsAndR.md
Last active July 22, 2022 07:56
How to use Google's API with R

Using Google Maps API and R

This script uses RCurl and RJSONIO to download data from Google's API to get the latitude, longitude, location type, and formatted address

library(RCurl)
library(RJSONIO)
library(plyr)
@calvinmetcalf
calvinmetcalf / README.md
Last active February 7, 2024 06:39
arcpy tutorial

Let's make a tool!

import arcpy, os, tempfile

import is used to bring in another library, here we bring in:

  • arcpy which is the esri library and
  • os which for Operating system things
  • tempfile is for making temperary files