Skip to content

Instantly share code, notes, and snippets.

# 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
@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" />
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>BlocoNotas</title>
<link href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css" rel="stylesheet">
<script src="//cdn.jsdelivr.net/jquery/2.1.0/jquery.min.js"></script>
<script src="//netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"></script>
</head>
# shell functions to setup rails features
# https://gist.github.com/c6180ddda37377a8613a
# rt == rails_template
# source rails-template.sh
# rails new appname -B
# cd appname
rt_init() {
git init
git add .
@neves
neves / fiddle.response.json
Last active August 29, 2015 14:02
fiddle.response.json
[{"value":"john"},{"value":"julia"},{"value":"johnson"},{"value":"juliet"}]
<?php
$file = $argv[1];
$pdo = new PDO('mysql:host=localhost;dbname=log', 'root', '');
$pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$stmt = $pdo->prepare("INSERT INTO logs SET
data = ?,
elapse = ?,
ip = ?,
<?php
class DB2PHP {
public function __construct($dir, $conn, $records_per_page = 1000) {
@mkdir($dir);
$this->dir = $dir;
$this->conn = $conn;
$this->records_per_page = $records_per_page;
}
<?php
use Isse\Db\SetUp;
require_once __DIR__ . '/../bootstrap/execsh.php';
$host = DB_HOST;
$db = DB_NAME;
$oracle_pdo = new PDO("oci:dbname=$host/$db", DB_USER, DB_PWD);
$oracle_pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
# cria um emulador ios para cordova
cordova create emulator
cd emulator
git init
git add .
git commit -m 'cordova create emulator'
for name in battery-status camera console contacts device device-motion device-orientation dialogs file file-system-roots file-transfer geolocation globalization inappbrowser media media-capture network-information plugin.softkeyboard speech.speechsynthesis splashscreen statusbar vibration
do