Skip to content

Instantly share code, notes, and snippets.

View thiagozs's full-sized avatar
:octocat:
Have a nice day

Thiago Zilli Sarmento thiagozs

:octocat:
Have a nice day
View GitHub Profile
@thiagozs
thiagozs / genpasswd.sh
Created September 23, 2015 17:56
Bash password generator
#!/bin/bash
genpasswd() {
local l=$1
[ "$l" == "" ] && l=16
tr -dc A-Za-z0-9_ < /dev/urandom | head -c ${l} | xargs
}
genpasswd
@thiagozs
thiagozs / markdown.html
Created October 7, 2015 19:17
html render markdown
<!DOCTYPE html>
<html>
<title>Hello Strapdown</title>
<xmp theme="united" style="display:none;">
# Markdown text goes in here
## Chapter 1
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore

Instalando no Ubuntu

$ sudo apt-get install zsnes:i386

Download roms

http://www.emuparadise.me/Super_Nintendo_Entertainment_System_(SNES)_ROMs/

https://www.loveroms.com/roms/super-nintendo

HTTPie Examples.

Pass parameters with json data.

http http://localhost:8085/query  \
	events:='["cache.hit", "cache.miss"]' \
	select:='["$count"]' \
	group:='"$event"'
@thiagozs
thiagozs / LimitStream.js
Created May 6, 2016 14:51 — forked from 4poc/LimitStream.js
Node.js: LimitStream (Bandwidth limited Readable+Writable Stream)
var fs = require('fs'),
util = require('util'),
Stream = require('stream').Stream;
/**
* Create a bandwidth limited stream
*
* This is a read+writeable stream that can limit how fast it
* is written onto by emitting pause and resume events to
* maintain a specified bandwidth limit, that limit can
@thiagozs
thiagozs / rancher_backup
Created May 27, 2016 13:25 — forked from mrrooijen/rancher
Dumps, compresses, encrypts, transfers, and rotates Rancher backups to/on Amazon S3.
#! /bin/bash
# Dumps, compresses, encrypts, transfers, and rotates Rancher backups to/on Amazon S3.
# Requirements:
#
# 1. Docker
#
# $ curl -fsSL https://get.docker.com/ | sh
@thiagozs
thiagozs / gitlab_backup
Created May 27, 2016 13:25 — forked from mrrooijen/gitlab_backup
Generates, encrypts, transfers and rotates Gitlab backups to/on Amazon S3.
#! /bin/bash
# Generates, encrypts, transfers and rotates Gitlab backups to/on Amazon S3.
# Requirements:
#
# 1. Gitlab
#
# $ apt-get update
@thiagozs
thiagozs / countries.js
Created May 27, 2016 13:27 — forked from mrrooijen/countries.js
A list of country codes and names
COUNTRIES = {
"US": "United States",
"AF": "Afghanistan",
"AX": "Åland Islands",
"AL": "Albania",
"DZ": "Algeria",
"AS": "American Samoa",
"AD": "Andorra",
"AO": "Angola",
"AI": "Anguilla",
package main
import (
"fmt"
"github.com/codegangsta/negroni"
"github.com/julienschmidt/httprouter"
"net/http"
)
func main() {
@thiagozs
thiagozs / wordpress-docker.md
Created July 6, 2016 20:01
wordpress docker

Docker start mysql

  • sudo docker run --name=mysql -e MYSQL_ROOT_PASSWORD=secret@ -d mysql

Docker start wordpress

  • sudo docker run --name=wordpress --link mysql:mysql -e WORDPRESS_DB_HOST=mysql -e WORDPRESS_DB_PASSWORD=secret@ -p 8888:80 -d wordpress