NOTE I now use the conventions detailed in the SUIT framework
Used to provide structural templates.
Pattern
t-template-name
| /* | |
| * Normalized hide address bar for iOS & Android | |
| * (c) Scott Jehl, scottjehl.com | |
| * MIT License | |
| */ | |
| (function( win ){ | |
| var doc = win.document; | |
| // If there's a hash, or addEventListener is undefined, stop here | |
| if( !location.hash && win.addEventListener ){ |
NOTE I now use the conventions detailed in the SUIT framework
Used to provide structural templates.
Pattern
t-template-name
| server { | |
| listen 80; | |
| server_name localhost; | |
| root /home/website/web; | |
| rewrite ^/app\.php/?(.*)$ /$1 permanent; | |
| try_files $uri @rewriteapp; | |
| location @rewriteapp { |
| function autogrow(textarea) { | |
| // create fake div with same content | |
| // (only works with box-sizing border-box) | |
| var dv = document.createElement("div"); | |
| dv.className = 'fm-growable'; | |
| dv.style.visibility="hidden"; | |
| dv.style.position="absolute"; | |
| textarea.parentNode.appendChild(dv); | |
| package main | |
| import ( | |
| "fmt" | |
| "net/http" | |
| "time" | |
| ) | |
| var urls = []string{ | |
| "https://splice.com/", |
| <?php | |
| $root = $_SERVER['DOCUMENT_ROOT']; | |
| chdir($root); | |
| $path = '/'.ltrim(parse_url($_SERVER['REQUEST_URI'])['path'],'/'); | |
| set_include_path(get_include_path().':'.__DIR__); | |
| if(file_exists($root.$path)) | |
| { | |
| if(is_dir($root.$path) && substr($path,strlen($path) - 1, 1) !== '/') | |
| $path = rtrim($path,'/').'/index.php'; |
| <?php | |
| function time2str($ts) { | |
| if(!ctype_digit($ts)) { | |
| $ts = strtotime($ts); | |
| } | |
| $diff = time() - $ts; | |
| if($diff == 0) { | |
| return 'now'; | |
| } elseif($diff > 0) { | |
| $day_diff = floor($diff / 86400); |
| Carta finalizada; Abri uma petição pública para ela, e assim que atingirmos mais de 5000 assinaturas enviarei ao Senador, que é relator do projeto. | |
| A petição se encontra em: http://www.peticaopublica.com.br/?pi=P2012N30508 | |
| Caro Senador Wellington Dias, |
| # | |
| # Sample nginx.conf optimized for EC2 c1.medium to xlarge instances. | |
| # Also look at the haproxy.conf file for how the backend is balanced. | |
| # | |
| user "nginx" "nginx"; | |
| worker_processes 10; | |
| error_log /var/log/nginx_error.log info; |