Skip to content

Instantly share code, notes, and snippets.

@neves
neves / movimentacao.js
Created October 16, 2011 18:57
MongoDB Financeiro
// criar um banco de dados chamado vmmtur
use vmmtur
// cria uma variavel correntista armazenando apenas o _id e o saldo dele.
var correntista = {
_id:"neves",
saldo:0
}
// insere o documento correntista na coleção correntistas.
@neves
neves / fonts.txt
Created February 8, 2012 12:15
fonts
name type emb sub uni object ID
------------------------------------ ----------------- --- --- --- ---------
v04n01_01-01
Times-Roman TrueType no no yes 6 0
RZMLBF+Swiss721BT-Light TrueType yes yes yes 9 0
CAZZZJ+LinotypeAroma-Light Type 1C yes yes yes 13 0
RZMLBF+Minion-Semibold Type 1C yes yes yes 18 0
RZMLBF+LinotypeAroma-SemiBold CID Type 0C yes yes yes 26 0
RZMLBF+Futura-Bold Type 1C yes yes yes 22 0
@neves
neves / 000.md
Created May 5, 2012 13:52
pdf2swf-bug

pdf2swf is generating wrong character encoding.

version: 0.9.2

OS: MacOS Lion

The rendering is perfect, but the character information of the glyph is incorrect. For example, in some files, the letter "n" became a character with the follow byte sequence: 238,128,167. (instead of the expected 110 char ord).

<?php
$rx = "!\[soundcloud id='(\d+)'\]!";
$str = <<<S
[soundcloud id='44111489']
[soundcloud id='54111489']
S;
$match = array();
preg_match_all($rx, $str, $match);
@neves
neves / template.html
Created November 9, 2012 00:31
template jQuery CoffeeScript
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width">
<meta name="description" content="">
<meta name="author" content="">
<title>TEMPLATE</title>
<link rel="stylesheet" href="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.2.1/css/bootstrap-combined.min.css">
@neves
neves / backtrace.php
Created November 8, 2013 17:07
PHP clean backtrace
<?php
function backtrace()
{
$backtrace = debug_backtrace();
$log = "\n";
$root = @$_SERVER['DOCUMENT_ROOT'];
foreach ($backtrace as $trace) {
$class = "";
# mac virgem 10GB ((9.0Gi with df -h))
# apenas para forçar a senha
sudo -v
# brew (install xcode tools and git)
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
brew doctor
sudo -v
html {
background-image: url(http://subtlepatterns.com/patterns/bo_play_pattern.png);
padding-top: 10px;
}
body {
padding-top: 15px;
padding-bottom: 20px;
}
@import url('//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css');
@media (min-width: 769px) {
html,
.navbar-fixed-top,
.navbar-fixed-bottom {
width: 320px;
margin: auto;
}
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta content="Gerenciador de Gastos Rápidos" name="description" />
<meta content="rails,html5,bootstrap,gastos,financeiro,mobile" name="keywords" />
<meta content="Marcos Neves" name="author" />
<meta content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, target-densitydpi=device-dpi" name="viewport" />
<meta content="yes" name="apple-mobile-web-app-capable" />
<meta content="black-translucent" name="apple-mobile-web-app-status-bar-style" />