- Scott Chacon on the Interwebs(リンク切れ)
- Scott Chacon on the Interwebs
- GitHub Flow - The best way to use Git and GitHub
31 Aug 2011
// | |
// gcc -lmicrohttpd mhd.c | |
// | |
#include <string.h> | |
#include <sys/types.h> | |
#include <sys/select.h> | |
#include <sys/socket.h> | |
#include <microhttpd.h> |
/* | |
* From css-tricks.com | |
* http://css-tricks.com/snippets/css/media-queries-for-standard-devices/ | |
*/ | |
/* Smartphones (portrait and landscape) ----------- */ | |
@media only screen | |
and (min-device-width : 320px) | |
and (max-device-width : 480px) { | |
/* Styles */ |
def consumer | |
OAuth::Consumer.new(TWITTER_CONSUMER_KEY,TWITTER_CONSUMER_SECRET,{:site=>"http://twitter.com" }) | |
end | |
def loginTwitter | |
@req_token = consumer.get_request_token(:oauth_callback=>"http://127.0.0.1:3000/login/twitter/success") | |
session[:request_token] = @req_token.token | |
session[:request_token_secret] = @req_token.secret | |
redirect_to @req_token.authorize_url | |
end |
body { | |
font-family: Helvetica, arial, sans-serif; | |
font-size: 14px; | |
line-height: 1.6; | |
padding-top: 10px; | |
padding-bottom: 10px; | |
background-color: white; | |
padding: 30px; } | |
body > *:first-child { |
An introduction to curl
using GitHub's API.
Makes a basic GET request to the specifed URI
curl https://api.github.com/users/caspyin
.highlight { | |
background-color: #efefef; | |
padding: 7px 7px 7px 10px; | |
border: 1px solid #ddd; | |
-moz-box-shadow: 3px 3px rgba(0,0,0,0.1); | |
-webkit-box-shadow: 3px 3px rgba(0,0,0,0.1); | |
box-shadow: 3px 3px rgba(0,0,0,0.1); | |
margin: 20px 0 20px 0; | |
overflow: hidden; |
module Sunspot | |
module DataMapper | |
def self.included(base) | |
base.class_eval do | |
alias new_record? new? | |
end | |
base.extend Sunspot::Rails::Searchable::ActsAsMethods | |
Sunspot::Adapters::DataAccessor.register(DataAccessor, base) |