This file contains hidden or 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
from os import curdir, sep | |
import httplib | |
from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer | |
workvar = 0 | |
# arrvar holds the remaining possible solutions to this block | |
arrvar = range(999) | |
globport = 0 | |
# config vars: | |
serva8 = "level08-3.stripe-ctf.com" #level8 server |
This file contains hidden or 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
How I Explained REST to My Dad | |
Sunday, December 12, 2004 | |
Translations of the following dialog available in Japanese, French, Vietnamese, Italian, Spanish, Portuguese, and Chinese. Huge thanks to YAMAMOTO Yohei, Karl Dubost, jishin, Barbz, Tordek, Edgard Arakaki, keven lw, respectively. If you know of additional translations, please leave a comment with the location. | |
Dad: Who is Roy Fielding? | |
Ryan: Some guy. He’s smart. |
This file contains hidden or 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
// i18n.js | |
// Copyright 2011 Bradly Feeley | |
// Language attribute should be added to the html nodes. | |
// <html lang="en"> | |
// | |
// Alternatively, you can set the language by passing an argument to the I18n.set_locale function. | |
// | |
// Early in the layout view before all other js: | |
// <script src="/javascripts/i18n.js" type="text/javascript" charset="utf-8"></script> |
This file contains hidden or 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
// Clear Default Text Input Value on Focus | |
function hasPlaceholderSupport() { | |
var input = document.createElement('input'); | |
return ('placeholder' in input); | |
} | |
if ( hasPlaceholderSupport() == false ) { | |
$('input[type="text"]').each(function(){ | |
var def = $(this).attr('placeholder') != '' && $(this).attr('placeholder') != undefined ? $(this).attr('placeholder') : $(this).attr('value'); |
This file contains hidden or 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
Day job: | |
Your Rails contributions (if any): | |
What's your Ruby/Rail experience?: | |
How do you use GitHub?: |
This file contains hidden or 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 'net/ssh' | |
desc "Deploy site to production" | |
task :deploy => :environment do | |
host = 'yourhost.com' | |
user = 'username' | |
options = {:keys => '~/.ssh/keys/yourserver.pem'} | |
remote_path = '/path/to/rails_app' | |
commands = [ |
This file contains hidden or 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
string = "FourscoreandsevenyearsagoourfaathersbroughtforthonthiscontainentanewnationconceivedinzLibertyanddedicatedtothepropositionthatallmenarecreatedequalNowweareengagedinagreahtcivilwartestingwhetherthatnaptionoranynartionsoconceivedandsodedicatedcanlongendureWeareqmetonagreatbattlefiemldoftzhatwarWehavecometodedicpateaportionofthatfieldasafinalrestingplaceforthosewhoheregavetheirlivesthatthatnationmightliveItisaltogetherfangandproperthatweshoulddothisButinalargersensewecannotdedicatewecannotconsecratewecannothallowthisgroundThebravelmenlivinganddeadwhostruggledherehaveconsecrateditfaraboveourpoorponwertoaddordetractTgheworldadswfilllittlenotlenorlongrememberwhatwesayherebutitcanneverforgetwhattheydidhereItisforusthelivingrathertobededicatedheretotheulnfinishedworkwhichtheywhofoughtherehavethusfarsonoblyadvancedItisratherforustobeherededicatedtothegreattdafskremainingbeforeusthatfromthesehonoreddeadwetakeincreaseddevotiontothatcauseforwhichtheygavethelastpfullmeasureofdevotionthatweherehighlyresolvethatthe |
This file contains hidden or 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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" | |
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> | |
<title>Snakezz</title> | |
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> | |
</head> | |
<body> |
This file contains hidden or 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
# Filters added to this controller apply to all controllers in the application. | |
# Likewise, all the methods added will be available for all controllers. | |
class ApplicationController < ActionController::Base | |
include Clearance::Authentication | |
helper :all # include all helpers, all the time | |
protect_from_forgery # See ActionController::RequestForgeryProtection for details | |
# Scrub sensitive parameters from your log | |
# filter_parameter_logging :password |
This file contains hidden or 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
@@ -221,7 +221,7 @@ module ActiveSupport #:nodoc: | |
case params.class.to_s | |
when "Hash" | |
params.inject({}) do |h,(k,v)| | |
- h[k.to_s.underscore.tr("-", "_")] = unrename_keys(v) | |
+ h[k.to_s.tr("-", "_")] = unrename_keys(v) | |
h | |
end | |
when "Array" |