Skip to content

Instantly share code, notes, and snippets.

@shello
shello / linux.die.net.css
Created July 13, 2012 01:36
linux.die.net manpages style based on solarized
@-moz-document url-prefix("http://linux.die.net/man/") {
/*
linux.die.net manpages, solarized dark style
*/
body { background: #002b36; color: #839496; }
h1 { border-bottom-color: #586e75; }
h2 { font-size: 1.4em; margin-bottom: 0.2em; }
Este é um apontamento por Carlos Duarte sobre aspectos práticos da Língua
Portuguesa, originalmente alojado em
<http://pagpessoais.iol.pt/~mz17929a/escrever-bem.txt>.
Recuperado da cópia de 3 de Março de 2009 na Wayback Machine do Internet
Archive<web.archive.org>.
@shello
shello / README.md
Created November 26, 2012 03:21
Vertically split tile with centered vertical alignment

See a demo on jsFiddle.

Check the inline comments for details.

@shello
shello / .htaccess
Last active December 10, 2015 15:08
Portugal@Folding FahSig generator. Created by @joaomoreno, modified by @shello.
# Expires (cache) para sigs, shello@2010/09/13
ExpiresActive On
ExpiresByType image/png "now plus 12 hours"
# Rewriting para sigs dinamicas
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)\.(?:php|png)$ _signature.php?user=$1
<?php
public function testSerializeAndDecryptWithStringExpires()
{
$value = 'bar';
$headers = new \Slim\Http\Headers();
$settings = array(
'cookies.encrypt' => true,
#!/usr/bin/env sh
# Retrieves a remote file to a temporary local file, and prints its path
remotetmp() {
REMOTE_TMPFILE=`mktemp`
scp -q $1 $REMOTE_TMPFILE
if [[ $? == 0 ]]; then
print $REMOTE_TMPFILE;
fi
}
<?php
// Adapted from http://stackoverflow.com/a/1320259
function array_flatten($array)
{
return iterator_to_array(
new RecursiveIteratorIterator(
new RecursiveArrayIterator($array)
),
false
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@shello
shello / onchange.sh
Last active August 29, 2015 14:02 — forked from senko/onchange.sh
#!/bin/bash
#
# Watch current directory (recursively) for file changes, and execute a command
# when a file or directory is created, modified or deleted.
#
# Modified from the original by: Senko Rasic <[email protected]>
# https://gist.github.com/senko/1154509
#
# Requires:
# bash
@shello
shello / randomEmoji.py
Last active March 12, 2025 19:23
Random Emoji! (for Python 3)
#!/usr/bin/env python3
from itertools import accumulate
from bisect import bisect
from random import randrange
from unicodedata import name as unicode_name
# Set the unicode version.
# Your system may not support Unicode 7.0 charecters just yet! So hipster.
UNICODE_VERSION = 6