I hereby claim:
- I am mickstevens on github.
- I am mickstevens (https://keybase.io/mickstevens) on keybase.
- I have a public key whose fingerprint is BCB1 83E5 9D0C BF0E D36C 520C 8AFF 64E0 F774 3984
To claim this, I am signing this object:
| # --------------------------------------------------------------------------- | |
| # | |
| # Description: This file holds all my BASH configurations and aliases | |
| # | |
| # Sections: | |
| # 1. Environment Configuration | |
| # 2. Make Terminal Better (remapping defaults and adding functionality) | |
| # 3. File and Folder Management | |
| # 4. Searching | |
| # 5. Process Management |
| # vid @ https://twitter.com/josh_cheek/status/835884161047080960 | |
| # and @ https://vimeo.com/205773556 | |
| require 'graphics' | |
| class MineSweeper | |
| class Cell | |
| attr_reader :x, :y | |
| def initialize(mine:, clicked:, marked:, x:, y:) | |
| @x, @y, @mine, @clicked, @marked = x, y, mine, clicked, marked | |
| end |
I hereby claim:
To claim this, I am signing this object:
| # Sample code from TheSimplePostcard.com | |
| # TechStack: Django, PostgreSQL, VQL, Twilio, Lob, Stripe, Bootstrap, usaddress | |
| # Occasionally, we choose to ship a card for free | |
| import datetime, random | |
| def FreeCard(): | |
| die_1 = random.randint(1, 6) | |
| die_2 = random.randint(1, 6) | |
| current_month = datetime.datetime.now().month | |
| return (die_1 + die_2) == current_month |
My friend was stuck without an internet connection during this year's State of the Union. I wanted to make sure we could all share our hot takes and direct quotes with them, so I made this 'lil distribution channel in the ten minutes before the speech.
I wrote these docs, and this script, in a total of ten minutes. It may be a bit rough. I'll be making updates to simplify and clarify in a few minutes. If you have any questions, leave a comment on the Gist, or get at me on Twitter -- I'm glad to help!
For SMS messaging, I used the awesome Twilio SMS APIs. To post to Twitter, I used the one, the only Twitter API.
| Standard | |
| Bleed Margin: 90mm x 52mm | |
| Content Ends: 87mm x 49mm | |
| Imperial | |
| Bleed Margin: 3.54in x 2.05in | |
| Content Ends: 3.43in x 1.93in | |
| <?php | |
| $db_host='dbserver'; | |
| $db_name='dbame'; | |
| $db_user='dbuser'; | |
| $db_passwd='dbpassword'; | |
| mysql_connect($db_host, $db_user, $db_passwd) | |
| or die('Could not connect: ' . mysql_error()); | |
| mysql_select_db($db_name) or die('Could not select database'); |
| <?php | |
| require("Services/Twilio.php"); | |
| require("database.php"); | |
| // require POST request | |
| if ($_SERVER['REQUEST_METHOD'] != "POST") die; | |
| // generate "random" 6-digit verification code | |
| $code = rand(100000, 999999); |
| { | |
| "sparkAccessToken": "", | |
| "sparkDeviceID": "", | |
| "twilioAccountSID": "", | |
| "twilioAuthToken": "", | |
| "toPhoneNumber": "[NUMBER TO CALL]", | |
| "fromPhoneNumber": "[YOUR TWILIO NUMBER]", | |
| "paperTowelTwiml": "[URL TO TWIML FILE. DROPBOX WORKS GREAT]" | |
| } |
| /* O U T O F O F F I C E F O R T W I T T E R */ | |
| /* - - - - - - - - - - - - - - - - - - - - - */ | |
| /* Written by Amit Agarwal http://labnol.org?p=27911 */ | |
| /* For customization and support, see http://ctrlq.org */ | |
| function start() { |