Skip to content

Instantly share code, notes, and snippets.

View jalcine's full-sized avatar
💭
Decentralize and democratize the Web.

Jacky Alciné jalcine

💭
Decentralize and democratize the Web.
View GitHub Profile
@jalcine
jalcine / about.md
Created August 9, 2011 20:41 — forked from Quebecisnice/about.md
Programming Achievements: How to Level Up as a Developer
@jalcine
jalcine / dart.txt
Created November 24, 2011 07:22 — forked from paulmillr/dart.md
Leaked internal google dart email
---------- Forwarded message ----------
From: Mark S. Miller <erights@google.com>
Date: Tue, Nov 16, 2010 at 3:44 PM
Subject: "Future of Javascript" doc from our internal "JavaScript Summit"
last week
To: javascript-standard@google.com
On November 10th and 11th, a number of Google teams representing a variety
of viewpoints on client-side languages met to agree on a common vision for
the future of Javascript.
@jalcine
jalcine / latency.txt
Created June 1, 2012 06:01 — forked from jboner/latency.txt
Latency numbers every programmer should know
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns
Mutex lock/unlock 25 ns
Main memory reference 100 ns
Compress 1K bytes with Zippy 3,000 ns
Send 2K bytes over 1 Gbps network 20,000 ns
Read 1 MB sequentially from memory 250,000 ns
Round trip within same datacenter 500,000 ns
Disk seek 10,000,000 ns
@jalcine
jalcine / activeadmin-cancan.rb
Created July 6, 2012 12:05
Deep integration of CanCan into ActiveAdmin
# blog post:
module ActiveAdmin
module ViewHelpers
# lib/active_admin/view_helpers/auto_link_helper.rb
def auto_link(resource, link_content = nil)
content = link_content || display_name(resource)
if can?(:read, resource) && registration = active_admin_resource_for(resource.class)
begin
@jalcine
jalcine / gist:3659070
Created September 6, 2012 18:10 — forked from trevorturk/gist:1756760
Bare minimum html5 template
<!DOCTYPE html>
<html>
<head>
<title>title</title>
</head>
<body>
<p>body</p>
</body>
</html>
@jalcine
jalcine / 01. Gemfile
Created September 6, 2012 19:22 — forked from schleg/01. Gemfile
Setup for Devise + Omniauth
gem 'pg'
group :development do
gem 'ruby-debug'
end
gem 'rake', '~> 0.8.7'
gem 'devise'
gem 'oa-oauth', :require => 'omniauth/oauth'
gem 'omniauth'
gem 'haml'
gem 'dynamic_form'
@jalcine
jalcine / dabblet.css
Created September 18, 2012 19:07 — forked from LeaVerou/dabblet.css
Fixed width, fluid background
/**
* Fixed width, fluid background
*/
body { margin: 0; font-family: Futura, sans-serif; }
h1 { margin-top: 0 }
section {
width: 700px;
@jalcine
jalcine / omniauth.rb
Created October 2, 2012 17:00 — forked from dira/omniauth.rb
OmniAuth strategy for a custom provider
# config/initializers/omniauth.rb
module OmniAuth
module Strategies
# tell OmniAuth to load our strategy
autoload :Pixelation, 'lib/pixelation_strategy'
end
end
Rails.application.config.middleware.use OmniAuth::Builder do
provider :twitter, "app_name", "secret"
@jalcine
jalcine / application.html.erb
Created October 2, 2012 17:01 — forked from rdetert/application.html.erb
How to logout completely from Facebook using Ruby on Rails and Devise + Omniauth. I'm just modifying the Omniauth Railscast http://railscasts.com/episodes/236-omniauth-part-2
<div id="user_nav">
<% if user_signed_in? %>
<img src="<%= user_avatar %>" id="main_avatar"> Signed in as <%= current_user.email %>.<br />
Not you?
<% if session[:fb_token].nil? %>
<%= link_to "Sign out", destroy_user_session_path %>
<% else %>
<%= link_to "Sign out", facebook_logout_path %>
<% end %>
@jalcine
jalcine / gist-1.sh
Created October 3, 2012 18:59 — forked from rondale-sc/gist-1.sh
setting-up-a-remote-environment
$ vi ~/.ssh/config
# Add the following information
Host rails_blog_db
HostName 0.0.0.0 # your remote's public facing IP
Port 3122
User jjackson # your username
LocalForward 3307 192.168.100.1:3306