Skip to content

Instantly share code, notes, and snippets.

View ericchaves's full-sized avatar

Eric Paschoalick Chaves ericchaves

View GitHub Profile
@ericchaves
ericchaves / Instalacao.md
Last active February 15, 2016 23:35
Instalando Arch Linux em um notebook Lenovo G50-80

Arch Linux - Lenovo G50-80 passo-a-passo

Geral

ATENÇÃO

Estas anotações NÃO compõem um script para ser executado, apesar de possuir comandos a ser executados. Use por sua conta e risco. São apenas anotações para meu próprio uso. Use por sua conta e risco. Este é um setup experimental. Use por sua conta e risco. Estes procedimentos irão apagar completamente as partições de seu disco. Use por sua conta e risco. NÃO siga estas instruções caso deseje montar um sistema com dual boot. Use por sua conta e risco.

@ericchaves
ericchaves / artboards.sketchpreset
Created November 29, 2015 14:26 — forked from cristianferrarig/artboards.sketchpreset
Custom Sketch Artboards Presets
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<array>
<dict>
<key>name</key>
<string>Pages</string>
<key>presets</key>

S3 Website "Index Document"

index.html:

<html>
<head>
<title>403 Forbidden</title>
</head>
<body>
@ericchaves
ericchaves / graphite
Last active August 29, 2015 14:13 — forked from hmmbug/graphite
# goes in /etc/nginx/sites-available & link in ../sites-enabled
upstream graphite {
server unix:///tmp/uwsgi.sock;
}
server {
listen 9002;
server_name localhost;
@ericchaves
ericchaves / Vagrantfile
Last active August 29, 2015 14:01
Vagrant-coreos looses connection whenever I build a dockerfile
# -*- mode: ruby -*-
# # vi: set ft=ruby :
require 'fileutils'
CLOUD_CONFIG_PATH = "./user-data"
CONFIG= "config.rb"
# Defaults for config options defined in CONFIG
$num_instances = 1
@ericchaves
ericchaves / Database.js
Created April 30, 2012 19:50
sandboxed-module TypeError
var settings = require('../config/settings'),
url = require('url'),
mongodb = require("mongodb");
var Database = function(){
this._isConnected = false;
this.uri = url.parse(settings.mongodb, true);
var q = this.uri.query;
this.socketOptions = {
timeout : q.timeout || 0,
@ericchaves
ericchaves / weird.js
Created April 30, 2012 17:21
instanceof regexp evalutes to false inside a sandbox
var reg = /^[a-z]$/;
console.log('case 01: typeof /^[a-z]$/ returns %s', typeof reg);
console.log('case 02: /^[a-z]$/ instanceof RegExp returns %s', reg instanceof RegExp);
console.log('case 03: /^[a-z]$/.constructor.name === "RegExp" returns %s', reg.constructor.name === 'RegExp');
var util = require('util'),
vm = require('vm'),
sandbox = { u: reg };