Skip to content

Instantly share code, notes, and snippets.

View ambethia's full-sized avatar
🐼
PANDAS!

Jason L Perry ambethia

🐼
PANDAS!
View GitHub Profile
@ambethia
ambethia / 0_reuse_code.js
Last active August 27, 2015 19:17
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
D5ZgzuAq9UBXwiBZCWX8hRmP1Vhearwy82
Order
--------------------------------
ID | 1
CustomerID | 69
5minutesEnabled | true
10MinutesEnabled | false

Keybase proof

I hereby claim:

  • I am ambethia on github.
  • I am ambethia (https://keybase.io/ambethia) on keybase.
  • I have a public key whose fingerprint is 4A38 F268 346D 0587 EB3F F0EB 5C4C 4B56 FE10 40FE

To claim this, I am signing this object:

@ambethia
ambethia / push_pull.md
Created June 12, 2014 18:33
Heroku DB pull and push.

Pull

curl -o db.dump `heroku pgbackups:url` 
pg_restore --verbose --clean --no-acl --no-owner -d DATABASE_NAME db.dump

Push

heroku pg:reset DATABASE_URL

pg_dump -xO DATABASE_NAME | psql heroku config:get DATABASE_URL

<link rel="import" href="../components/polymer/polymer.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
width: 100%;
height: 100%;
-- Reading configuration and build instructions -- 1404859264 [Tue, 08 Jul 2014 18:41:04 -0400]
Please wait, this will take some time...
-- Workorder Summary -- 1404859266 [Tue, 08 Jul 2014 18:41:06 -0400]
Timesys Factory (Released: 20140707)
System
|----------------------------------------|
| Board Name | premierwave_xn |
| Architecture | armv5l |
| Kernel Architecture | arm |
| Kernel Version | 2.6.39 |
@ambethia
ambethia / book.rb
Last active August 29, 2015 14:06
Throttle Hack
class Book
extend Throttle
def self.sales_rank(isbn_13)
throttle(1.second) do
# Do stuff with Amazon Product API that's rate limited to 1 req/s.
end
end
end
# Code here...
if __FILE__ == $0
require "minitest/autorun"
class StubTest < MiniTest::Test
def test_stub
assert(true)