$ gem install rails
$ rails new oath_provider_sample
$ cd oath_provider_sample
$ git init .
$ git add .
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
{ | |
"name": "application", | |
"description": "Sets up rails project", | |
"default_attributes": { | |
"rails-stack": { | |
"deployer": "deployer", | |
"authorized_keys": [ | |
"PUBLIC_KEY_FOR_APP_DEPLOYER_USER1", | |
"PUBLIC_KEY_FOR_APP_DEPLOYER_USER2" |
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
# Usage: | |
# - Download the jquery plugin from https://github.com/openexchangerates/accounting.js | |
# - Save the min file in the `vendor/assets/javascripts/ folder | |
# - Add this file to `app/assets/priceFormatter.js.coffee` | |
# - Add to `app/assets/application.js.coffee`: | |
# `#= require accounting.js` | |
# `#= require priceFormatter.js` | |
class PriceFormatter | |
constructor: ($scope) -> |
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
var say = function(string1) { | |
var result = function(string2) { | |
return say(string1 + " " + string2); | |
} | |
result.prototype = new String(); | |
result.toString = function() { | |
return string1; |
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" | |
"net/http" | |
) | |
type String string | |
type Struct struct { |
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" | |
"net/http" | |
"github.com/HitFox/ad_server/app" | |
"github.com/HitFox/ad_server/handler/bulk" | |
"github.com/HitFox/ad_server/mid" | |
"runtime" |
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
// RUN: go test -run=XXX -bench=. string_con_test.go | |
// OUTOUT: | |
/* | |
PASS | |
BenchmarkNaiveConact 2000000000 0.64 ns/op | |
BenchmarkJoinsConact 3000000 432 ns/op | |
BenchmarkBuffer 3000000 541 ns/op | |
ok command-line-arguments 5.262s | |
*/ | |
package main |
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
# encoding: utf-8 | |
require 'nokogiri' | |
require 'csv' | |
def parse_row(row) | |
result = {} | |
row.children.each do |el| | |
next if el.name == 'text' | |
result[el.name] = el.text.strip |
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
files: | |
"/opt/elasticbeanstalk/hooks/appdeploy/post/01_notify.sh": | |
mode: "000755" | |
owner: root | |
group: root | |
content: | | |
#!/usr/bin/env bash | |
EB_CONFIG_SOURCE_BUNDLE=$(/opt/elasticbeanstalk/bin/get-config container -k source_bundle) | |
EB_SUPPORT_FILES=$(/opt/elasticbeanstalk/bin/get-config container -k support_files_dir) |
OlderNewer