This file contains 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
CarrierWave.configure do |config| | |
if S3_SECRET && !Rails.env.test? | |
config.fog_provider = 'fog/aws' | |
config.fog_credentials = { | |
provider: 'AWS', | |
aws_access_key_id: S3_ACCESS_KEY, | |
aws_secret_access_key: S3_SECRET | |
} | |
config.fog_directory = S3_BUCKET | |
config.fog_public = true |
This file contains 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
function checkObj(checkProp) { | |
// We check that the object has a propery | |
if(myObj.hasOwnProperty(checkProp)) { | |
return myObj[checkProp]; | |
} | |
// We did not find anything | |
return "Not Found"; | |
} |
This file contains 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
# use UTF8 | |
set -g utf8 | |
set-window-option -g utf8 on | |
# make tmux display things in 256 colors | |
set -g default-terminal "screen-256color" | |
set -g default-terminal "screen-256color" | |
# set scrollback history to 10000 (10k) | |
set -g history-limit 10000 |
This file contains 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
TODO: | |
[] Add a login screen. | |
We use Auth0 for login, so we need to integrate the lock into the app. | |
When you are logged out, you will see the login screen. Once you login, we | |
store your token in local storage and you can see the other parts of the | |
application. | |
This file contains 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
package main | |
import ( | |
"fmt" | |
"io/ioutil" | |
"os" | |
"github.com/Jeffail/gabs" | |
) |
This file contains 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 COMMANDS = { | |
"1F": [3], | |
"1B": [5], | |
"1L": [11], | |
"1R": [13], | |
"1FR": [3, 13], | |
"1FL": [3, 11], | |
"1BR": [5, 13], | |
"1BL": [5, 11], | |
"2F": [18], |
This file contains 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
type AmazonResponse struct { | |
Reservations []Reservation `json:"Reservations"` | |
} | |
type Reservation struct { | |
Instances []Instace `json:"Instances"` | |
} | |
type Instance struct { | |
PublicIpAddres string `json:"PublicIpAddres"` |
This file contains 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
#!/usr/bin/python3 | |
import pygame | |
import sys | |
class Game(): | |
def __init__(self): | |
self._running = True |
This file contains 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
{ | |
"account": "{account-id}", | |
"detail": { | |
"clusterArn": "arn:aws:ecs:us-east-1:{account-id}:cluster/{cluster-id}", | |
"containerInstanceArn": "arn:aws:ecs:us-east-1:{account-id}:container-instance/0b1a4979-3846-4e3e-846f-b63a9ad545b0", | |
"containers": [ | |
{ | |
"containerArn": "arn:aws:ecs:us-east-1:{account-id}:container/4ce75a22-f1c9-4ac2-8607-a503e7682c1d", | |
"exitCode": 1, | |
"lastStatus": "STOPPED", |
This file contains 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
/* | |
Read more about event patterns here: | |
http://docs.aws.amazon.com/AmazonCloudWatch/latest/events/CloudWatchEventsandEventPatterns.html | |
*/ | |
data "template_file" "event_pattern" { | |
template = "${file("${path.module}/files/deploy-notification.json.tpl")}" | |
vars = { | |
cluster_arn = "${aws_ecs_cluster.ecs.id}" | |
} |