This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const AWS = require('aws-sdk') | |
const fs = require('fs') | |
const path = require('path') | |
const mime = require('mime') | |
const chalk = require('chalk') | |
const s3 = new AWS.S3() | |
const s3Bucket = 'my-s3-bucket.com' | |
const directoryName = 'build' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# sort things by highest priority & lowest time | |
thing1 = {'id': 1, 'priority': 1, 'time': 500} | |
thing2 = {'id': 2, 'priority': 5, 'time': 400} | |
thing3 = {'id': 3, 'priority': 5, 'time': 600} | |
thing4 = {'id': 4, 'priority': 10, 'time': 100} | |
things = [thing1, thing2, thing3, thing4] | |
def sort_things(thing1, thing2): | |
if thing1['priority'] > thing2['priority']: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const chalk = require('chalk') | |
const exec = require('child_process').exec | |
const fs = require('fs') | |
const readline = require('readline') | |
const spawn = require('child_process').spawn | |
const repoName = 'MyRepo' | |
const repoUrl = `https://github.com/MyOrg/${repoName}` | |
const checkMark = chalk.green('\u2713') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import sys | |
import imp | |
import inspect | |
import re | |
import unittest | |
PWD = os.environ.get('PWD') | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
class MyTabBarController: UITabBarController { | |
override func viewDidLoad() { | |
super.viewDidLoad() | |
delegate = self | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Upstart Script for Otto Server | |
# - file location: /etc/init/otto-server.conf | |
description "otto-server" | |
start on started mountall | |
stop on shutdown | |
# Automatically Respawn | |
respawn |