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
<title>{% if page.title %}{{ page.title }} - {{ site.title }}{% else %}{{ site.title }}{% endif %}</title> |
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
{ | |
"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
# | |
# 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
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
<!-- facebook Open Graph Metadatas --> | |
<meta content="your_facebook_app_id" property="fb:app_id"> | |
<meta content="{{ site.title }}" property="og:site_name"> | |
{% if page.title %} | |
<meta content="{{ page.title }}" property="og:title"> | |
{% else %} | |
<meta content="{{ site.title }}" property="og:title"> | |
{% endif %} | |
{% if page.title %} | |
<meta content="article" property="og:type"> |
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
<!-- Twitter cards metadatas --> | |
<meta name="twitter:card" content="summary"> | |
<meta name="twitter:site" content="@vdaubry"> | |
<meta name="twitter:creator" content="@vdaubry"> | |
{% if page.title %} | |
<meta name="twitter:title" content="{{ page.title }}"> | |
{% else %} | |
<meta name="twitter:title" content="{{ site.title }}"> | |
{% endif %} | |
{% if page.url %} |
OlderNewer