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
capital = Money.from_amount("985.13464".to_f, "eu16") | |
price = Money.from_amount("707.5".to_f, "eu16") | |
size = Money.from_amount(capital / price, "btc16") | |
(capital - price * size.to_f).format | |
=> "€0,0000000000000000" | |
capital = Money.from_amount("985.13464".to_f, "eu16") | |
price = Money.from_amount("707.5".to_f, "eu16") | |
size = Money.from_amount(capital / price, "btc16") | |
(capital - price * size.to_d).format |
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
# | |
# Cookbook Name:: github-awards | |
# Recipe:: default | |
# | |
# Copyright 2016, YOUR_COMPANY_NAME | |
# | |
# All rights reserved - Do Not Redistribute | |
# | |
apt_repository "ruby" do |
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
{ | |
"user": { | |
"id": 15638312, | |
"login": "vdaubry", | |
"gravatar_url": "https://avatars.githubusercontent.com/u/498298?v=3", | |
"city": "paris", | |
"country": "france", | |
"rankings": [{ | |
"language": "ruby", | |
"repository_count": 28, |
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
class Api::V1::BaseController < ActionController::Base | |
before_filter :allow_cors | |
def allow_cors | |
headers["Access-Control-Allow-Origin"] = "*" | |
headers["Access-Control-Allow-Methods"] = %w{GET POST PUT DELETE}.join(",") | |
headers["Access-Control-Allow-Headers"] = %w{Origin Accept Content-Type X-Requested-With X-CSRF-Token X-API-Auth-Token}.join(",") | |
end | |
def options |
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
$ curl -i https://api.github.com/users/wesleytodd/repos | |
HTTP/1.1 200 OK | |
Server: GitHub.com | |
Date: Tue, 31 Mar 2015 12:13:14 GMT | |
Content-Type: application/json; charset=utf-8 | |
Content-Length: 158992 | |
Status: 200 OK | |
X-RateLimit-Limit: 60 | |
X-RateLimit-Remaining: 59 | |
X-RateLimit-Reset: 1427807594 |
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
upstream puma { | |
server unix:///srv/www/githubawards/shared/tmp/sockets/puma.sock; | |
} | |
server { | |
listen 80 default_server deferred; | |
# server_name example.com; | |
root /srv/www/githubawards/current/public; | |
access_log /srv/www/githubawards/shared/log/nginx.access.log; |
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
$ curl -I -x 127.0.0.1:5566 https://www.google.fr | |
HTTP/1.1 200 Connection established | |
Proxy-Agent: Privoxy/3.0.23 | |
X-Servedby: 50001 | |
HTTP/1.1 200 OK | |
Date: Sat, 07 Feb 2015 16:29:25 GMT | |
Expires: -1 | |
Cache-Control: private, max-age=0 | |
Content-Type: text/html; charset=ISO-8859-1 |
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
$ curl -I -x 127.0.0.1:5566 http://www.google.fr | |
HTTP/1.1 200 OK | |
Date: Sat, 07 Feb 2015 16:28:17 GMT | |
Expires: -1 | |
Cache-Control: private, max-age=0 | |
Content-Type: text/html; charset=ISO-8859-1 | |
Set-Cookie: PREF=ID=5472383c9c9d26f1:FF=0:TM=1423326497:LM=1423326497:S=yu2leDB676aEfg96; expires=Mon, 06-Feb-2017 16:28:17 GMT; path=/; domain=.google.fr | |
Set-Cookie: NID=67=iPjeDuufTg9UhlCrCuMmA93LSA8LWjBl_H3tliNTWZUsQS2Gtzw36xR2fFz_D9Nz0eWg8Fy_qtTy_cozXTuil7reP_6mwd0_WrH1j1RrSZZlDv3rEXyHOOXnZ1h07qax; expires=Sun, 09-Aug-2015 16:28:17 GMT; path=/; domain=.google.fr; HttpOnly | |
P3P: CP="This is not a P3P policy! See http://www.google.com/support/accounts/bin/answer.py?hl=en&answer=151657 for more info." | |
Server: gws |
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
<div class="fb-share-button" data-href="{{site.url}}{{page.url}}" data-layout="button_count" style="position: relative; top: -8px; left: 33px;"></div> |
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
<title>{% if page.title %}{{ page.title }}{% else %}{{ site.title }}{% endif %}</title> |
NewerOlder