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
# Related: https://github.com/rails/rails/issues/1525#issuecomment-1782439 | |
# Rails freezes when | |
module ActionDispatch | |
module Routing | |
class RouteSet | |
def inspect | |
# The solution is... to throw a random exception (to halt the normal flow, I think) | |
wtf! | |
end | |
end |
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
# Use KeyValue to store globally unique data | |
KeyValue.set('api_key', '123') # => true | |
KeyValue.get('api_key') # => '123' | |
# You can use the alternate syntax: | |
KeyValue['api_key'] = '123' # => true | |
KeyValue['api_key'] # => '123' |
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
require 'cuba' | |
class MyApp < Cuba | |
define do | |
on root do | |
res.write "it works!" | |
end | |
end |
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 OfferPageBuilder | |
def initialize(account) | |
@account = account | |
end | |
def build | |
page = OffersPage.new { | |
name: "Special Offers", | |
heading: "Special Offers on Dental Services in #{@account.geo_keyword}, #{@account.state}", |
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
Gmail | |
https://mail.google.com/mail/u/0/#inbox | |
Calendar | |
https://www.google.com/calendar/render?tab=mc | |
Delicious | |
http://www.delicious.com/joaquinvicente/%s | |
Google Maps (Ciudad de BsAs) |
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
DATA.rewind | |
puts DATA.read | |
__END__ |
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
$ traceroute 216.81.59.173 | |
traceroute to 216.81.59.173 (216.81.59.173), 64 hops max, 52 byte packets | |
1 * * * | |
2 * * * | |
3 * * * | |
4 * * * | |
5 133-165-89-200.fibertel.com.ar (200.89.165.133) 66.947 ms | |
189-165-89-200.fibertel.com.ar (200.89.165.189) 64.246 ms | |
157-165-89-200.fibertel.com.ar (200.89.165.157) 64.231 ms |
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
// source: https://delicious.com/js/app.js | |
key("/",this.focusSearch), | |
key("1",this.showDiscover), | |
key("2",this.showNetwork), | |
key("3",this.showRemember)}, | |
//... | |
key("k",this.showPreviousDetailPane), | |
key("up",this.showPreviousDetailPane), | |
key("j",this.showNextDetailPane), | |
key("down",this.showNextDetailPane), |
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
<html> | |
<head> | |
<link href="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.1/css/bootstrap-combined.min.css" rel="stylesheet"></link> | |
<script src="http://code.jquery.com/jquery.js"></script> | |
<script src="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.1/js/bootstrap.min.js"></script> | |
</head> | |
<body> | |
<style type="text/css"> | |
#myCarousel { |
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
sudo apt-get -y install python-software-properties | |
sudo add-apt-repository ppa:juju/pkgs | |
sudo apt-get update | |
sudo apt-get -y install lxc apt-cacher-ng libzookeeper-java zookeeper juju git | |
# create a SSH authorized/public key | |
ssh-keygen -t rsa | |
# set AWS credentials | |
export AWS_ACCESS_KEY_ID=XXXXXXXX |
OlderNewer