Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View allthesignals's full-sized avatar
🥑
coding lotsa code

Matt Gardner allthesignals

🥑
coding lotsa code
View GitHub Profile
@allthesignals
allthesignals / hubway_stations.sql
Created June 6, 2014 19:55
SQL dump of Hubway stations (requires PostGIS)
--
-- PostgreSQL database dump
-- psql dbname < hubway_stations.sql
--
SET statement_timeout = 0;
SET lock_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SET check_function_bodies = false;
pg_restore: [archiver (db)] Error while PROCESSING TOC:
pg_restore: [archiver (db)] Error from TOC entry 1274; 0 0 SHELL TYPE box2d postgres
pg_restore: [archiver (db)] could not execute query: ERROR: type "box2d" already exists
Command was: CREATE TYPE box2d;
pg_restore: [archiver (db)] Error from TOC entry 254; 1255 16461 FUNCTION box2d_in(cstring) postgres
pg_restore: [archiver (db)] could not execute query: ERROR: function "box2d_in" already exists with same argument types
Command was: CREATE FUNCTION box2d_in(cstring) RETURNS box2d
@allthesignals
allthesignals / gist:881aa68c36a868cf33b4
Created February 27, 2015 22:47
Output of installed.packages()
License_restricts_use OS_type MD5sum NeedsCompilation Built
acepack NA NA NA "yes" "3.1.2"
car NA NA NA "no" "3.1.2"
codetools NA NA NA "no" "3.1.2"
colorspace NA NA NA "yes" "3.1.2"
DBI NA NA NA "no" "3.1.2"
dichromat NA NA NA NA "3.1.2"
digest NA NA NA "yes" "3.1.2"
evaluate NA NA NA "no" "3.1.2"
formatR NA NA NA "no" "3.1.2"
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@allthesignals
allthesignals / gist:19226941bcef4b0f479b
Created July 1, 2015 02:47
SciPy on Ubuntu 14.04 on Digital Ocean in a virtualenv
This file has been truncated, but you can view the full file.
Matts-iMac:~ mattgardner$ pwd
/Users/mattgardner
Matts-iMac:~ mattgardner$ ls
Applications Documents Movies Public exercism
Desktop Downloads Music VirtualBox VMs install
Development Library Pictures bin
Matts-iMac:~ mattgardner$ ssh root@104.131.72.8
The authenticity of host '104.131.72.8 (104.131.72.8)' can't be established.
RSA key fingerprint is 38:37:d7:93:e1:7a:a4:40:b2:f4:4d:69:35:05:9d:60.
Are you sure you want to continue connecting (yes/no)? yes
var fullList = jQuery(".elementList .editFriends div a"); var emptyArray=[]; jQuery(".elementList .editFriends div a").map(function(elem) { emptyArray.push(fullList[elem].href); }); emptyArray.forEach(function(el) { jQuery.post(el); });
@allthesignals
allthesignals / group-by.js
Created March 26, 2016 21:39 — forked from arenoir/group-by.js
Ember group by computed macro
import Ember from 'ember';
var get = Ember.get,
arrayComputed = Ember.arrayComputed;
export default function (dependentKey, property) {
var options = {
@allthesignals
allthesignals / Open iterm tab here
Last active April 7, 2016 15:24 — forked from eric-hu/Open iterm tab here
Apple script to right click a CSV file to open it in an interactive python shell and load into a Pandas dataframe. To use:(1) Open Automator(2) Create a new service(3) Change "Service receives selected" drop downs to "Files or folders" in "Finder"(4) Select "Run applescript" from the sidebar, then paste this script in and save
-- Adapted from these sources:
-- http://peterdowns.com/posts/open-iterm-finder-service.html
-- https://gist.github.com/cowboy/905546
--
-- Modified to work with files as well, cd-ing to their container folder
on run {input, parameters}
tell application "Finder"
set my_file to first item of input
set filetype to (kind of (info for my_file))
-- Treats OS X applications as files. To treat them as folders, integrate this SO answer:
import Ember from 'ember';
export default Ember.Controller.extend({
queryParams: ["redevelopment"],
redevelopment: null,
actions: {
toggleIt: function() {
var value = this.get("redevelopment");
this.toggleProperty("redevelopment");
this.set("typeof", typeof value);