Skip to content

Instantly share code, notes, and snippets.

View caracalla's full-sized avatar
🚇
Training

James "Kimo" Florencio caracalla

🚇
Training
View GitHub Profile

Keybase proof

I hereby claim:

  • I am caracalla on github.
  • I am caracalla (https://keybase.io/caracalla) on keybase.
  • I have a public key whose fingerprint is 1093 67C2 38BC 42BE E939 BE2A 3C42 BDA4 1632 3FE7

To claim this, I am signing this object:

@caracalla
caracalla / gist:e07e5d979f05ddffe889
Created August 9, 2015 17:58
neighbor.has_bomb
# With @board[neighbor.x, neighbor.y].has_bomb
+---+---+---+---+---+---+---+---+---+---+
| ☺ | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
+---+---+---+---+---+---+---+---+---+---+
| 0 | | | | | | | | | |
+---+---+---+---+---+---+---+---+---+---+
| 1 | | | | | | | | | |
+---+---+---+---+---+---+---+---+---+---+
| 2 | | | 1 | 1 | 1 | | | | |
[8] shuddle » body = API::Counter.new(counter_options).send_metric
=> {
:counter => [
[0] {
:metric => "rails-api.google_places.requests.count",
:value => 1,
:timestamp => 1455131412000,
:dimensions => [
[0] {
:key => "host",
{
"trip": {
"actual_ends_at": "2016-02-24T16:22:18.091-08:00",
"actual_starts_at": "2016-02-24T16:22:14.158-08:00",
"carpool": false,
"coupon_redemption": null,
"id": 100741,
"instructions": null,
"rated_by_organizer_at": null,
"ride_along": false,
Maltese Falcon
Barry Lyndon
Bill Cunningham New York
Inland Empire
Stalker
One few over the cuckoo's nest
Wake in Fright
Slackers
Trainspotting
Miller's Crossing
@caracalla
caracalla / infra_notes.md
Last active May 19, 2016 14:44
Infrastructure setup notes

NEED TO DO

  • set up automated database testing - ansible/roles/builder/tasks/main.yml
  • for production, create instance groups for zone a b and c
  • update google for work account for routing
  • set up google login for admin
  • set up twilio for holla
  • get admin working
  • get www working?
  • update push notifications
  • review rails env vars
{
"trips": [{
"actual_earnings": 2000,
"actual_starts_at": "2016-03-03T15:29:03.225-08:00",
"estimated_earnings": 2200,
"id": 124377,
"state": "complete",
"time_anchor": "pick_up",
"planned_route": {
"id": 254355,
james@Lucifer: (5961-booking-cutoff-enforcement $) ∫ shdl db console -e production
psql (9.5.2)
SSL connection (protocol: TLSv1.2, cipher: ECDHE-RSA-AES256-GCM-SHA384, bits: 256, compression: off)
Type "help" for help.
shuddle=# select * from short_links where id='organizer_schedule'
shuddle-# ;
id | url | click_count | created_at | updated_at | shuddle_employee_id | active | coupon | remaining | free_trips_granted | expires_at | user_type | account_credit_granted | resource_id | resource_type | deep_link | redemption_policies | coupon_redemption_count | internal_comment | type
--------------------+-----+-------------+----------------------------+----------------------------+---------------------+--------+--------+-----------+--------------------+------------+-----------+------------------------+-------------+---------------+-----------+---------------------+-------------------------+------------------+-----------------------
shuddle=# select * from short_links where id='02bb';
id | url | click_count | created_at | updated_at | shuddle_employee_id | active | coupon | remaining | free_trips_granted | expires_at | user_type | resource_id | resource_type | deep_link | account_credit_granted | redemption_policies | coupon_redemption_count | internal_comment | type
------+------------------------------+-------------+----------------------------+----------------------------+---------------------+--------+--------+-----------+--------------------+------------+-----------+-------------+---------------+-----------+------------------------+---------------------+-------------------------+------------------+-----------------------------------
02bb | shdl-organizer://static/home | 185 | 2015-08-04 19:06:18.499833 | 2016-06-18 00:38:20.971647 | | t | f | | | | organizer | home
james@Lucifer: (6101-extra-events *$) ∫ shdl -e production rails rake db:migrate
[3.245s] running rake task...
** [Bugsnag] Bugsnag exception handler 3.0.0 ready, api_key=53f129301c9d8f302107de9d5fbd6cba
(5.6ms) SELECT f_geometry_column,coord_dimension,srid,type FROM geometry_columns WHERE f_table_name='users'
ActiveRecord::SchemaMigration Load (1.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
Migrating to CreateMongoTablesForPg (20160703150712)
(0.7ms) BEGIN
== 20160703150712 CreateMongoTablesForPg: migrating ===========================
-- create_table(:mongo_addresses, {:id=>false})
(1.0ms) CREATE TABLE "mongo_addresses" ("mid" character varying(255), "parent" character varying(255), "name" character varying(255), "lat" character varying(255), "lng" character varying(255), "addr1" character varying(255), "city" character varying(255), "state" character varying(255), "zip" character varying(255), "validity_state" character varying(255), "formatted_address" character varying(255),