Skip to content

Instantly share code, notes, and snippets.

@thiagogabriel
thiagogabriel / gist:3929248
Created October 22, 2012 02:00
Comandos úteis GIT
<Comandos GIT>
[Repositório]
git –bare init
Cria um repositório git para acesso remoto
[ Commits ]
git add -A
// Adiciona todas as alterações, inclusive arquivos novos, para commit
@thiagogabriel
thiagogabriel / giffy
Created June 23, 2013 02:48 — forked from fnando/giffy
#!/usr/bin/env bash
if [[ ! -f "$1" ]]; then
echo "=> Movie file not found"
exit 1
fi
tempfile=/tmp/output.gif
rm -f $tempfile
# rails-api App
class ArticlesController < ApplicationController
def index
@articles = Article.all
render json: @articles
end
def show
@article = Article.find(params[:id])
set -g default-terminal "screen-256color"
set -g status-bg black
set -g status-fg white
setw -g mode-mouse on
set-option -g base-index 1
set-option -g prefix C-a
unbind-key C-b
bind-key C-a send-prefix
set -g status-keys vi
set-window-option -g utf8 on
require 'csv'
require 'json'
array = []
CSV.foreach('full-list.csv') do |row|
array << {
name: row[0],
address: row[1],
location: {
__type: 'GeoPoint',
using UnityEngine;
using System.Collections;
public class NewBehaviourScript : MonoBehaviour {
// Use this for initialization
void Start () {
}
#pragma strict
function Start () {
}
function Update () {
}
@IBAction func openFolderAction(sender: AnyObject) {
let rpFilePicker:NSOpenPanel = NSOpenPanel()
rpFilePicker.allowsMultipleSelection = false
rpFilePicker.canChooseDirectories = true
rpFilePicker.canChooseFiles = false
rpFilePicker.runModal()
let chosenFile = rpFilePicker.URL
@thiagogabriel
thiagogabriel / phoenix benchmark
Last active March 21, 2016 00:18
phoenix benchmark on heroku doing external request to requestb.in
Using HTTPotion
With external request 1
800 requests
150 concurrency
failed 564
Requests per second: 88.32
________________________________________
With external request 2
Hashtag helper does not store user credentials.
We may analyse the app usage anonymously to improve the user experience and add better features.