Skip to content

Instantly share code, notes, and snippets.

View Eunoia's full-sized avatar
🍍
bring the hustle

Evan R Eunoia

🍍
bring the hustle
View GitHub Profile
@Eunoia
Eunoia / details.md
Last active February 8, 2018 19:30
Pre planning

Howdy!

We're going to look at some data in Postgresql. To get started, you might want to get some useful tools first.

The good GUI client

https://macpostgresclient.com/

To install postgresql locally

brew install postgresql

@Eunoia
Eunoia / Gulpfile.js
Created November 19, 2014 17:43
Deploy your wintersmith generated static site to amazon S3
var fs = require('fs');
var gulp = require('gulp');
var runWintersmith = require('run-wintersmith');
var s3 = require("gulp-s3");
var options = { headers: {'Cache-Control': 'public'} }
gulp.task('default', function() {
console.log('`gulp deploy` to deploy')
});
@Eunoia
Eunoia / session_info.txt
Created July 5, 2017 16:16
results of running session_info
> sessionInfo()
R version 3.3.3 (2017-03-06)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: OS X El Capitan 10.11.6
locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
Year,Period,Area,Adjusted,Preliminary,Rate
"2016","Annual","Alameda County","Not Adj","Not Prelim","4.2"
"2015","Annual","Alameda County","Not Adj","Not Prelim","4.7"
"2014","Annual","Alameda County","Not Adj","Not Prelim","5.8"
"2013","Annual","Alameda County","Not Adj","Not Prelim","7.2"
"2012","Annual","Alameda County","Not Adj","Not Prelim","8.7"
"2011","Annual","Alameda County","Not Adj","Not Prelim","10.1"
"2011","Annual","Alameda County","Not Adj","Not Prelim","10.1"
"2010","Annual","Alameda County","Not Adj","Not Prelim","10.9"
"2010","Annual","Alameda County","Not Adj","Not Prelim","10.9"
@Eunoia
Eunoia / noodles.json
Created March 21, 2017 01:04
noodle map style
[
{
"elementType": "labels",
"stylers": [
{
"visibility": "off"
}
]
},
{
//! moment.js
//! version : 2.14.1
//! authors : Tim Wood, Iskren Chernev, Moment.js contributors
//! license : MIT
//! momentjs.com
;(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) :
global.moment = factory()
//! moment.js
//! version : 2.14.1
//! authors : Tim Wood, Iskren Chernev, Moment.js contributors
//! license : MIT
//! momentjs.com
;(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) :
global.moment = factory()
@Eunoia
Eunoia / sampler.js
Created February 16, 2016 17:00
Two ways to do the same thing.
// shorter
color = details.leftToPurchase < 0 ? 'red' : '#534F4E';
// more clear
if(details.leftToPurchase < 0){
color = 'red';
} else {
color = '#534F4E';
}
?>
<li class="one-third first single-item create-board" data-price="000000" data-category="!000000" data-source="000000" data-purchased="100000000000">
<a onClick='iframe_open("/popups/popup-add-item.php?name=<?php echo rawurlencode($project) . '&pnumber=' . $pnumber; ?>", "480", "200", "no")'>
<img src="images/plus-sign-large.png" alt="Add New Sum Board">
<p>Add New Item</p>
</a>
</li>
<?php
@Eunoia
Eunoia / unclaimed.rb
Created October 5, 2013 21:06
Just a little class to programmatically look up unclaimed property for californians.
require 'nokogiri'
require 'open-uri'
require 'pry'
require 'net/http'
require 'net/https'
class UnclaimedProperty
attr_accessor :lname, :fname, :middle, :city
attr_reader :results, :more_results_than_shown
def initialize(options)