$ gem install rails
$ rails new oath_provider_sample
$ cd oath_provider_sample
$ git init .
$ git add .
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
package main | |
import ( | |
"fmt" | |
"net/http" | |
) | |
type String string | |
type Struct struct { |
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
machine: | |
ruby: | |
version: jruby-1.7.16 | |
java: | |
version: openjdk7 | |
environment: | |
RAILS_ENV: test | |
JRUBY_OPTS: -J-XX:+TieredCompilation -J-XX:TieredStopAtLevel=1 -J-noverify -X-C -Xcompile.invokedynamic=false --1.9 -J-Xmx2g | |
dependencies: |
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
var say = function(string1) { | |
var result = function(string2) { | |
return say(string1 + " " + string2); | |
} | |
result.prototype = new String(); | |
result.toString = function() { | |
return string1; |
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
# 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 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
{ | |
"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 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
ssh example.com "cd /data/apps/example/current && ( RAILS_ENV=production RBENV_ROOT=/data/rbenv RBENV_VERSION=2.0.0-p247 /data/rbenv/bin/rbenv exec bundle exec rails console)" |
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
# Codingame: http://www.codingame.com/ide/?target=clogin&s=1&id=227787048586488d4709f87be22b41eab2321d#!test:247723:true:%2523!list | |
n = STDIN.gets.to_i | |
if n == 0 | |
puts 0 | |
exit | |
end | |
values = STDIN.gets.split(' ').map(&:to_i) | |
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
/ip dns static add address=127.0.0.1 ttl=600w name=".*\\.vk\\.com" | |
/ip dns static add address=127.0.0.1 ttl=600w name="rs.mailer.ru" | |
/ip dns static add address=127.0.0.1 ttl=600w name="googleads.g.doubleclick.net" | |
/ip dns static add address=127.0.0.1 ttl=600w name="pagead2.googlesyndication.com" | |
/ip dns static add address=127.0.0.1 ttl=600w name="www.googletagservices.com" | |
/ip dns static add address=127.0.0.1 ttl=600w name="a.pr.dotua.org" | |
/ip dns static add address=127.0.0.1 ttl=600w name="google-analytics.com" | |
/ip dns static add address=127.0.0.1 ttl=600w name=".*\\.google-analytics\\.com" | |
/ip dns static add address=127.0.0.1 ttl=600w name="mc.yandex.ru" | |
/ip dns static add address=127.0.0.1 ttl=600w name="share.yandex.ru" |