(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| #!/usr/bin/ruby | |
| require 'rss' | |
| # Usage | |
| # $ ./railscasts.rb http://railscasts.com/subscriptions/YOURRAILSCASTRSS/\/ | |
| # episodes.rss | |
| # OR | |
| # $ ./railscasts.rb | |
| p 'Downloading rss index' |
| # Your init script | |
| # | |
| # Atom will evaluate this file each time a new window is opened. It is run | |
| # after packages are loaded/activated and after the previous editor state | |
| # has been restored. | |
| # | |
| # An example hack to log to the console when each text editor is saved. | |
| # | |
| # atom.workspace.observeTextEditors (editor) -> | |
| # editor.onDidSave -> |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| You can ssh into the VM by finding the IP (from kubectl config view) and using username "docker" password "tcuser": | |
| ssh [email protected] |
| #! /usr/bin/python | |
| import boto3 | |
| import subprocess | |
| import datetime | |
| import os | |
| import zipfile | |
| import humanize | |
| WORKING_DIR = "/tmp" |
| #! /usr/bin/python | |
| import boto3 | |
| import subprocess | |
| import datetime | |
| import os | |
| now = datetime.datetime.now() | |
| bucket = "dtcorpbackup" | |
| filename = "dump_{}-{:0>2}-{:0>2}_{:0>2}:{:0>2}:{:0>2}.sql".format(now.year, now.month, now.day, now.hour, now.minute, now.second) |
| #!/usr/bin/env bash | |
| # Run this script to prepare DB for "prod" profile. | |
| # Require environment variable: | |
| # AWS_ACCESS_KEY_ID | |
| # AWS_SECRET_ACCESS_KEY | |
| set -e | |
| BUCKET=dtcorpbackup | |
| echo "Get latest backup" |
| usage() | |
| { | |
| echo "usage: get-rds-free-storage.sh -i instance -r region" | |
| } | |
| REGION="ap-southeast-1" | |
| START="$(date -v '-5M' -u '+%Y-%m-%dT%H:%M:%SZ')" # 5 minutes ago | |
| END="$(date -u '+%Y-%m-%dT%H:%M:%SZ')" | |
| INSTANCE_NAME="mydb" |
| function (user, context, callback) { | |
| var namespace = 'https://tojs.io/'; | |
| context.accessToken[namespace + 'user_authorization'] = { | |
| groups: user.app_metadata.groups, | |
| roles: user.app_metadata.roles, | |
| permissions: user.app_metadata.permissions | |
| }; | |
| return callback(null, user, context); | |
| } |