First create a Ubuntu 13.04 x64 droplet on DigitalOcean Control Panel
Then ssh with root account, run this in termianl:
$ wget -qO- https://raw.github.com/progrium/dokku/master/bootstrap.sh | sudo bash| def facebook_log_in | |
| # Scenarios | |
| # If the user is signed in and has no facebook uid we link the accounts | |
| # If the user is not signed in we create an account for him. | |
| # that's it. he is logged in for life. | |
| if player_signed_in? | |
| if current_player['fb_uid'].nil? | |
| # Link accounts | |
| puts "linking accounts" |
| <!DOCTYPE html> | |
| <!-- Helpful things to keep in your <head/> | |
| // Brian Blakely, 360i | |
| // http://twitter.com/brianblakely/ | |
| --> | |
| <head> | |
| <!-- Disable automatic DNS prefetching. | |
| <!DOCTYPE html> | |
| <!-- Helpful things to keep in your <head/> | |
| // Brian Blakely, 360i | |
| // http://twitter.com/brianblakely/ | |
| --> | |
| <head> | |
| <!-- Disable automatic DNS prefetching. | |
| body { | |
| font-family: sans-serif; | |
| } | |
| ul { | |
| list-style: none | |
| } | |
| li { | |
| background: slategrey; |
| <?php | |
| /** | |
| * SplClassLoader implementation that implements the technical interoperability | |
| * standards for PHP 5.3 namespaces and class names. | |
| * | |
| * http://groups.google.com/group/php-standards/web/final-proposal | |
| * | |
| * // Example which loads classes for the Doctrine Common package in the | |
| * // Doctrine\Common namespace. |
| // Skeleton jQuery plugin | |
| function($) | |
| { | |
| $.fn.myPlugin = function( options ) | |
| { | |
| // options. | |
| $.fn.myPlugin.settings = $.extend( {}, $.fn.myPlugin.defaults, options ); | |
| // Go through the matched elements and return the jQuery object. |
| class Integer | |
| def to_a | |
| arr = [] | |
| tmp = self | |
| while tmp>0 | |
| arr << tmp%10 | |
| tmp /= 10 | |
| end | |
| arr.reverse | |
| end |
| class Array | |
| def same? | |
| uniq.length==1 | |
| end | |
| end | |
| x = 1 | |
| y = 2 | |
| z = 2 | |
| l = 2 |