Skip to content

Instantly share code, notes, and snippets.

@rrmartins
rrmartins / app.rb
Last active December 12, 2015 06:38
The case is that I'm trying to make a contact form, which has an outgoing e-mail, and when the form is submitted it does not arrive in the post '/contact' of the file app.rb.
# encoding: utf-8
require 'sinatra/base'
require 'haml'
require 'sass'
require 'mail'
require File.expand_path('../nesta', File.dirname(__FILE__))
require File.expand_path('env', File.dirname(__FILE__))
require File.expand_path('cache', File.dirname(__FILE__))
require File.expand_path('config', File.dirname(__FILE__))
@rrmartins
rrmartins / application.css.sass
Created March 7, 2013 18:15
trace of error and file sass
/*
* This is a manifest file that'll automatically include all the stylesheets available in this directory
* and any sub-directories. You're free to add application-wide styles to this file and they'll appear at
* the top of the compiled file, but it's generally better to create a new file per style scope.
*= require_self
*= require_tree .
*/
/*
*= require_self
*= require_tree .
*
Sete Atitudes para Hackear a Indústria de Software
By Klaus Wuestefeld
1) Torne-se excelente.
Seja realmente bom em alguma coisa. Não fique só choramingando ou
querendo progredir às custas dos outros. Não pense q pq vc sentou 4
anos numa faculdade ouvindo um professor falar sobre software q vc
sabe alguma coisa. Jogador de futebol não aprende a jogar bola tendo
@rrmartins
rrmartins / vim_info.md
Created September 18, 2013 17:54 — forked from todgru/vim_info.md

#vim

My .vimrc file:

syntax on
set bs=2
set expandtab
set tabstop=2
set shiftwidth=2
set number
@rrmartins
rrmartins / Vagrantfile
Created February 4, 2014 11:20
Vagrantfile
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "cf"
config.vm.synced_folder ".", "/Workspace", id: "vagrant-root"
# config.vm.network :private_network, ip: "10.10.10.1"
forward_port = ->(guest, host = guest) do
config.vm.network :forwarded_port,
guest: guest,
@rrmartins
rrmartins / error.log
Created April 22, 2014 21:10
error tmate
➜ local git:(master) brew install tmate
==> Downloading https://github.com/nviennot/tmate/archive/1.8.9.tar.gz
Already downloaded: /Library/Caches/Homebrew/tmate-1.8.9.tar.gz
==> Patching
patching file osdep-darwin.c
patching file utf8.c
==> sh autogen.sh
configure.ac:108: error: possibly undefined macro: AC_SEARCH_LIBS
If this token and others are legitimate, please use m4_pattern_allow.
See the Autoconf documentation.
ssh [email protected]
ruby-1.9.3-p545 is not installed.
{
"snippets": [
{
"match": {"global": true, "pkgname": ".", "fn": ".*_test.go"},
"snippets": [
{"text": "func Test", "title": "", "value": "func Test${1:ObjectName}${2:TestName}(t *testing.T) {\n\t$0\n}"},
{"text": "func Benchmark", "title": "", "value": "func Benchmark${1:ObjectName}${2:BenchmarkName}(b *testing.B) {\n\n\tb.StopTimer()\n\n\t$0\n\n\tb.StartTimer()\n\n\tfor i := 0; i < b.N; i++ {\n\t\t\n\t}\n\n}"},
{"text": "func Example", "title": "", "value": "func Example${1:ObjectName}${2:ExampleName}() {\n\n\t$0\n\n\t// Output:\n\t// \n\n}"}
]
}
@rrmartins
rrmartins / postgres_array.go
Created August 16, 2016 19:00 — forked from adharris/postgres_array.go
PostgreSQL demo of Array types using Golang
package main
import (
"database/sql"
"errors"
"fmt"
_ "github.com/bmizerany/pq"
"os"
"regexp"
"strings"