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) 2011 Dmitri Smirnov, Mika Tuupola | |
# | |
# Adapted from: | |
# http://www.dmitri.me/misc/isikukood/isikukood.rb | |
# | |
# Licensed under the MIT license: | |
# http://www.opensource.org/licenses/mit-license.php |
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
<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 | |
</VirtualHost> |
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
<pre><div class="edit" id="unique_id">Editable text</div> | |
<a href="#" class="edit_trigger">Edit me!!</a></pre> | |
$(".edit").editable("http://www.example.com/save.php", { | |
event : "edit" | |
}); | |
/* Find and trigger "edit" event on correct Jeditable instance. */ | |
$(".edit_trigger").bind("click", function() { |
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
<div class="edit" id="unique_id">Editable text</div> | |
<a href="#" class="edit_trigger">Edit me!!</a></pre> |
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
#!/usr/bin/bash | |
for vhost in `ls /www`; do | |
if [ -d /www/$vhost/htdocs ]; then | |
/usr/local/bin/find /www/$vhost/htdocs -print0 | /usr/local/bin/xargs -0 chmod g+w | |
fi | |
if [ -d /www/$vhost/include ]; then | |
/usr/local/bin/find /www/$vhost/include -print0 | /usr/local/bin/xargs -0 chmod g+w | |
fi | |
done |
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
ps aux | grep httpd | grep -v pts | awk '{ tot += $6; procs += 1; print $2,$6,$11 } END { print "TOTAL:",tot,"/",procs,"=",tot/procs }' |
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 mount -t devpts /dev/ptmx /dev/pts |
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
$("#invite").bind("click", function(event) { | |
var invitation = { | |
method: "send", | |
name: "Lorem ipsum dolor sit amet", | |
link: "http://www.example.com/", | |
picture: "http://placekitten.com/95/95", | |
//to: next_uid, | |
description: "Typi non habent claritatem insitam; est usus legentis in iis qui facit eorum claritatem." | |
}; |
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 | |
RewriteCond %{HTTPS} off | |
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} |
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 data-category="Links" data-action="Leasing calculator" data-label="Avensis" href="http://aabw.toyota.ee/leasing/et/avensis">Avensis</a> | |
<a data-category="Links" data-action="Test drive" data-label="Aygo" href="http://aabw.toyota.ee/testdrive/et#aygo">Aygo</a> | |
<!-- Insurance does not allow linking directly to a model but we can include intended model in data-label. --> | |
<a data-category="Links" data-action="Insurance calculator" data-label="Land Cruiser" href="http://aabw.toyota.ee/insurance/">Insurance</a> | |
<a data-category="Links" data-action="Fuel calculator" data-label="RAV4" href="http://kampaania.toyota.ee/fuel/et#auris">RAV4</a> | |
<a data-category="Links" data-action="Model page" data-label="GT86" href="http://www.toyota.ee/cars/new_cars/gt86/index.tmex">GT86</a> | |
<!-- PDFs and stuff should have different category. --> | |
<a data-category="Downloads" data-action="PDF" href="/downloads/yaris-something.pdf">Yaris something</a> |