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
$(".editable").editable("http://www.example.com/save.php", { | |
type : "textarea", | |
submit : "OK", | |
data: function(value, settings) { | |
var retval = value.replace(/<br[\s\/]?>/gi, '\n'); | |
return retval; | |
} | |
}); |
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
/* | |
* Validate Estonian national identification code. | |
* | |
* Copyright (c) 2009 Mika Tuupola | |
* | |
* Licensed under the MIT license: | |
* http://www.opensource.org/licenses/mit-license.php | |
*/ | |
function isikukood(kood) { |
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
# Fixed Thin tasks for Vlad when using port and not socket (tuupola). | |
# | |
# $GEM_HOME/gems/vlad-1.4.0/lib/vlad/thin.rb | |
# Thin tasks for Vlad the Deployer | |
# By cnantais | |
require 'vlad' | |
namespace :vlad do | |
## | |
# Thin app 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
RewriteEngine On | |
RewriteBase / | |
# Everything not found goes to Sinatra / Rack | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteRule (.*) http://127.0.0.1:4567%{REQUEST_URI} [L,P,QSA] |
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
NameVirtualHost *:80 | |
<VirtualHost *:80> | |
ServerAdmin webmaster@localhost | |
VirtualDocumentRoot "/Users/tuupola/Code/www/%0/htdocs" | |
ServerName dev.subdomains | |
ServerAlias dev.* | |
LogFormat "%V %h %l %u %t \"%r\" %s %b" vcommon | |
ErrorLog "/Users/tuupola/Code/www/logs/vhosts-error_log" | |
CustomLog "/Users/tuupola/Code/www/logs/vhosts-access_log" vcommon |
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
git remote add someguy http://github.com/someguy/repository.git | |
git fetch someguy | |
git cherry-pick xxxxxxx |
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
$("a.delete").live("click", function(event) { | |
var self = this; | |
$.post(this.href, {_method: "delete"}, function(data) { | |
$(self).parent().parent().hide(); | |
}); | |
return false; | |
}); |
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
sudo bin/gem install rmagick --version '= 1.15.17' -- --build-flags --enable-allow-example-errors |
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
var estonian = { | |
months: "Jaanuar,Veebruar,Märts,Aprill,Mai,Juuni,Juuli,August,September,Oktoober,November,Detsember", | |
shortMonths: "jaan.,veebr.,märts,apr.,mai,juuni,juuli,aug.,sept.,okt.,nov.,dets.", | |
days: "Pühapäev,Esmaspäev,Teisipäev,Kolmapäev,Neljapäev,Reede,Laupäev", | |
shortDays: "P,E,T,K,N,R,L" | |
}; | |
var russian = { | |
months: "Январь,Февраль,Март,Апрель,Май,Июнь,Июль,Август,Сентябрь,Октябрь,Ноябрь,Декабрь", | |
shortMonths: "янв,фев,мар,апр,май,июн,июл,авг,сен,окт,ноя,дек", |
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
# Run the app (ruby app.rb or shotgun app.rb) | |
# | |
# Open the page. Login with test and test. Reload a few times. Page loads fine. Then | |
# click the link which make 302 redirect back to original page. Now when you reload it asks for | |
# username and password again. If you check the logs you can see credentials are now broken. | |
# Also tcpdump shows Authorization header is broken. | |
# | |
# Tested with Safari 5.0.4 (6533.20.27), Safari 5.0.3 (6533.19.4) | |
# Webkit Nightly 5.0.3 (6533.19.4, r80833) |
OlderNewer