Skip to content

Instantly share code, notes, and snippets.

View thiagovsk's full-sized avatar
🏠
Working from home

Thiago Ribeiro thiagovsk

🏠
Working from home
View GitHub Profile
<script type="text/javascript">
$(function() {
function cutAndPaste(from, to) {
$(to).append(function() {
return $(from + " option:selected").each(function() {
this.outerHTML;
}).remove();
# -*- encoding : utf-8 -*-
class TypesController < ApplicationController
# GET /types
# GET /types.json
def index
@types = Type.all
respond_to do |format|
format.html # index.html.erb
format.json { render json: @types }
# -*- encoding : utf-8 -*-
class PlacesController < ApplicationController
# GET /places
# GET /places.json
def index
@places = Place.all
respond_to do |format|
format.html # index.html.erb
format.json { render json: @places }
<script type="text/javascript">
$(function() {
function cutAndPaste(from, to) {
$(to).append(function() {
return $(from + " option:selected").each(function() {
this.outerHTML;
}).remove();
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDPlOnUU5K10wtmJ08nOZBePyzkq7rtsaiQrkaKAMZ+s7g0n8i5zaIzaX2x3csK9iSsFIcXEi5dWSuHuSiw5H66S5lKpVBdvQe93enehPfwIyUP7Wk+OLDR7Zgr9SOzlCCQckF3nCqE/1fhQk60OrhHZ+RPkyHqa9OqqXb35QRDDV/HlBL4K4XoJMgMStAR777NXoBpzXv4UATg5xcY5EmLUsdnN1xpVXX/NlUmsWwVQL3cWVWqEyNoepxeCa6qbrrEV8vGTYt1J7X11QaxxaUGhx9n2bTf7r9xuW+JdvirfG1hgWxoKVIDqQ1fkqKfo7SJoaxZwoV40yfn2YQOcIbKcCSp/6fpTcdOlOm10wHi38kPRf7H/uFBIHUM2dR0EEkImBnyC459j26RcRyes+3HClIxl/+GlRAEW98vAAgTpMrkiX8sNspl4BKYaS8ReKyxno8tYXNeWrdgjJ1Cgkhw1WO+5YDk81BlGz7RNoEJJ6z2E4QC6yAbhTlxqm8VQsjOGPmyGRKwfwW+ITuvrwWDpLiVJC7lmjwNRzBGrvTPWIDiYWYVz1ZCYuRbgUXkyLXlK+eK4ieqqS2jH6K92YOmUpLxsKEbkhIgviXu+O9fBaauim66BhW6GKUs531T1py3YO440xGtQcFv7mF8IJYOcve6XHUCC9gguWVnSaaG3Q== thiagitosouzagmail.com
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCgFInGpgqd7xJ1hwxrd5Ra2f00l+5ZLEbSY++WdTNE//Pytey2YoRGv5ygFxuTJz/8wX8twr3GMf2F2C7uDnNDlBZdaRLmUPpo7C3NiyxumY3vxcDhO8k1MCviDFQ2TlqXaq35APA2F6NKNeK7Jnh2N9BllUMvxeXYDg/+a3bju4s9tTjbtmxR5a8FqeQm0V6fdF0PqbJip7S/ABBOk94nExVRSwAjAiETEnnjNUj4vgyFemOj0uiklnfLRucvZGVSF8dpACBvETsfG9rLkwEb0stqamd0ZusM7+mTBK2YjdDSQeiayAg0IrRZ3PAZZ+dG6WeQVIsy4LJRpUsgxdN/5J9YqXkmNMt4N9rl0m0hYQMu8WUPa6oHJ/IS0UP3Z/tyfyi7SvoJunJcZHQYxY+L57n5ZXAp1kRwGOAKWVngRMylcqerpKFOMWzlfQMau/sdd8bV7KJbpv9jSaRxkxzKvwRlRVHQy/7C2DRnYUFuS4cxECR3B1Y6nZwHEaUgmQz7yP3vQsX4EZZjg+pYBPkTd1A1FtfiJjnQSgWtIQe2c0qVKMtZ7x5DKHcYz2aRem0f/1EmSgT6cTQnhlj2vxCckWg9Ajpbl1o7Og4FlmcfjDKeQXi2mTpx1CRzOWtWXalJ9P9SPvHa/tFYh95yw019PJN0H5CNhp6iCvsapQfjjQ== thiagitosouza@gmail.com
@thiagovsk
thiagovsk / REAME.md
Created November 23, 2015 23:02 — forked from romansklenar/REAME.md
How to set up your VPS with Chef Solo

How to set up your VPS with Chef Solo

1. What is it?

There are many different provisioning tools out there, the most popular of which are Chef and Puppet. Chef uses Ruby, Puppet uses a DSL (Domain Specific Language), there are others that use simple bash too, but today we're going to focus on Chef Solo.

2. Dependencies

To get Chef working properly on your local machine you need a few things.

Make sure you use Ruby 1.9.x and not Ruby 2.x as you will get errors with the json 1.6.1 gem on 2.x. Use rbenv or RVM to manage several different Rubies on the one machine.

@thiagovsk
thiagovsk / gist:c8c446ac49b9ee503e56
Created September 28, 2015 14:32
links para empacotamento ruby
https://wiki.debian.org/Teams/Ruby
https://alioth.debian.org/projects/pkg-ruby-extras/
https://wiki.debian.org/Teams/Ruby/RubyExtras/UpstreamDevelopers
https://wiki.debian.org/Teams/Ruby/Packaging
http://pet.debian.net/pkg-ruby-extras/pet.cgi
https://udd.debian.org/dmd.cgi?email1=pkg-ruby-extras-maintainers%40lists.alioth.debian.org
https://wiki.debian.org/Teams/Ruby/Ruby2.2
@thiagovsk
thiagovsk / owncloud.patch
Created August 7, 2015 19:33
owncloud.patch
Description: Owncloud multiple instances in same server.
Author: Thiago Ribeiro
Last-Update: 2015-07-02
Index: owncloud/core/setup/controller.php
===================================================================
--- owncloud.orig/core/setup/controller.php
+++ owncloud/core/setup/controller.php
@@ -40,7 +40,7 @@ class Controller {
* @param Setup $setupHelper
*/
17:11 <terceiro> sbadia: do you have any packaging of rubocop yet? thiagovsk (gsoc student working with me) wanted to use it (and package it if needed)
17:26 <sbadia> hi!
17:26 <sbadia> I've not given new from a while… sorry… (was off, but on now :))
17:27 <sbadia> Hum in my memories rubocop depends on ruby-progressbar and actually progressbar was packaged in Debian (the gem)
17:27 <sbadia> let me check
17:29 <sbadia> yep ruby-progressbar (the gem ruby-progressbar) and astrolab are missing in Debian
17:29 <sbadia> my initial work is on pkg-ruby-extra team repo : https://anonscm.debian.org/cgit/pkg-ruby-extras/rubocop.git
17:29 <sbadia> terceiro: ^
17:31 <sbadia> and for ruby-progressbar https://lists.debian.org/debian-ruby/2015/05/msg00043.html
17:41 → rZr joined (~rzr@82.236.136.171)