date | author | log |
---|---|---|
2016-10-10 |
dsoares |
Howto create my own port for MacPorts |
Veio a propósito do pedido de slopes com o comando:
#301 Redirects for .htaccess | |
#Redirect a single page: | |
Redirect 301 /pagename.php http://www.domain.com/pagename.html | |
#Redirect an entire site: | |
Redirect 301 / http://www.domain.com/ | |
#Redirect an entire site to a sub folder | |
Redirect 301 / http://www.domain.com/subfolder/ |
I hereby claim:
To claim this, I am signing this object:
# Your snippets | |
# | |
# Atom snippets allow you to enter a simple prefix in the editor and hit tab to | |
# expand the prefix into a larger code block with templated values. | |
# | |
# You can create a new snippet in this file by typing "snip" and then hitting | |
# tab. | |
# | |
# An example CoffeeScript snippet to expand log to console.log: | |
# |
function rot13(str) { // LBH QVQ VG! | |
var re = new RegExp("[a-z]", "i"); | |
var min = 'A'.charCodeAt(0); | |
var max = 'Z'.charCodeAt(0); | |
var factor = 13; | |
var result = ""; | |
str = str.toUpperCase(); | |
for (var i=0; i<str.length; i++) { | |
result += (re.test(str[i]) ? |
#!/usr/bin/perl | |
# | |
# 2014-11-19: dsoares | |
# also see https://metacpan.org/pod/File::Slurp | |
# | |
use strict; | |
use warnings; | |
use 5.010; |
<?php | |
// CSRF start | |
function store_in_session($key,$value) | |
{ | |
if(isset($_SESSION)){$_SESSION[$key]=$value;} | |
} | |
function unset_session($key) | |
{ | |
$_SESSION[$key]=' ';unset($_SESSION[$key]); |