Skip to content

Instantly share code, notes, and snippets.

View chiensiTB's full-sized avatar

Chien Si Harriman chiensiTB

  • San Francisco, CA
View GitHub Profile
@chiensiTB
chiensiTB / CreatePlaces migration
Created November 4, 2014 17:42
uploading worldweather data to Ruby on Rails, without permissions failure on Heroku
class CreatePlaces < ActiveRecord::Migration
# Rails migration for GeoWorldMap db into postgresql db
#(inspired by http://blog.inspired.no/populate-your-database-with-free-world-cities-countries-regions-in-2-minutes-using-a-rails-migration-273/ post)
#modified from the original gist, because of Heroku errors due to copy
#thanks to this post for helping me out:
#http://www.kadrmasconcepts.com/blog/2013/12/15/copy-millions-of-rows-to-postgresql-with-rails/
#extract files from GeoWorldMap.zip archive from here
# http://www.geobytes.com/GeoWorldMap.zip
#
@chiensiTB
chiensiTB / ecobeeConnectorHelper.js
Last active June 2, 2017 05:53
ecobeeSi Connector Conversions to EM.Core
//support
//constants
const timeslices = [
"12:00am",
"12:30am",
"1:00am",
"1:30am",
"2:00am",
"2:30am",
"3:00am",
@chiensiTB
chiensiTB / weMoConnectorHelper.js
Last active December 6, 2018 18:46
weMoConnector to and from EM.core
//support
//constants
// const timeslices = [
// "12:00am",
// "12:15am",
// "12:30am",
// "12:45am",
// "1:00am",
// "1:15am",
// "1:30am",