View gist:d404f792a87699c665e2
<!-- 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 %} |
View gist:69f089affeff3b6ca627
<!-- 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"> |
View gist:e863fec5dc52df6094edf78d5e7f0cba
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 |
View default.rb
# | |
# Cookbook Name:: github-awards | |
# Recipe:: default | |
# | |
# Copyright 2016, YOUR_COMPANY_NAME | |
# | |
# All rights reserved - Do Not Redistribute | |
# | |
apt_repository "ruby" do |
View user.json
{ | |
"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, |
View base_controller.rb
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 |
View gist:ff05c182a417b3e4baae
<title>{% if page.title %}{{ page.title }} - {{ site.title }}{% else %}{{ site.title }}{% endif %}</title> |
View gist:98733eb2bbfe3e64b350
$ 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 |
View gist:db113605c9f8af37a020
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; |
View gist:eafabf211957cbe87563
$ 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 |
NewerOlder