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 'rubygems' | |
require 'camping' | |
require 'camping/ar' | |
require 'camping/session' | |
require 'redcloth' | |
require 'xml/mapping' | |
Camping.goes :CSRFExperiment | |
module CSRFExperiment |
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
gem "haml", ">= 3.0.12" | |
gem "factory_girl" | |
gem "rspec-rails", ">= 2.0.0.beta.15", :group => :test | |
generators = <<-GENERATORS | |
config.generators do |g| | |
g.orm :active_record | |
g.template_engine :haml | |
g.test_framework :rspec, :fixture => false, :views => false | |
g.fixture_replacement :factory_girl |
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
Template: | |
<script id="competition-dashboard-template" type="text/x-handlebars-template"> | |
{{#competitionCompleted this}} | |
<h1>Done</h1> | |
{{else}} | |
<h1>Not Done</h1> | |
{{/competitionCompleted}} | |
{{#loginPanel}} |
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
# Origin of etag_matches? https://github.com/rails/rails/blob/7511f9794df8f803f28306d378f9fefc28165886/actionpack/lib/action_dispatch/http/cache.rb | |
module ActionController | |
class Request | |
alias_method :etag_matches_original?, :etag_matches? | |
def etag_matches?(etag) | |
!env['HTTP_USER_AGENT'].include?('MSIE') && etag_matches_original?(etag) |
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
<?xml version="1.0" encoding="utf-8"?> | |
<rdf:RDF xmlns:ical="http://www.w3.org/2002/12/cal/icaltzd#" | |
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" | |
xmlns:tosu="http://purl.org/finnonto/schema/toimintasuomi/" | |
xmlns:xml="http://www.w3.org/XML/1998/namespace" | |
xmlns:xs="http://www.w3.org/2001/XMLSchema#"> | |
<ical:Vevent rdf:about="http://www.sydan.fi/web/sydan-verkkolehti/tapahtumat?id=769"> | |
<ical:summary xml:lang="fi">Tahdistinkerhon luento Turussa</ical:summary> | |
<ical:description xml:lang="fi">Tahdistinkerhon luento Turussa</ical:description> | |
<tosu:content xml:lang="fi" rdf:parseType="Literal" xmlns="http://www.w3.org/1999/xhtml"> |
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
var find_out_meaning_of_life = function (is_it, callback) { | |
var meaning_of_life = 42; | |
try { | |
setTimeout(function () { | |
callback(null, (is_it === meaning_of_life)) | |
}, 420); | |
} catch(err) { | |
callback(err, 'FAIL!'); | |
} | |
}; |
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
package = "Ledge" | |
version = "1.0" | |
source = { | |
url = "git://github.com/pintsized/ledge.git" | |
} | |
description = { | |
summary = "Network support for the Lua language", | |
} | |
build = { |
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
#! /bin/sh | |
### BEGIN INIT INFO | |
# Provides: nginx | |
# Required-Start: $remote_fs $syslog | |
# Required-Stop: $remote_fs $syslog | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: nginx init.d dash script for Ubuntu <=9.10. | |
# Description: nginx init.d dash script for Ubuntu <=9.10. | |
### END INIT INFO |
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
#!/bin/sh | |
# | |
# nginx - this script starts and stops the nginx daemon | |
# | |
# chkconfig: - 85 15 | |
# description: Nginx is an HTTP(S) server, HTTP(S) reverse \ | |
# proxy and IMAP/POP3 proxy server | |
# processname: nginx | |
# config: /etc/nginx/nginx.conf | |
# config: /etc/sysconfig/nginx |
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
input { | |
stdin { | |
type => "stdin-type" | |
} | |
tcp { | |
port => 28777 | |
host => "0.0.0.0" | |
type=>"sample" | |
} | |
} |
OlderNewer