Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Thiago Ribeiro thiagovsk

🏠
Working from home
View GitHub Profile
View application_record.rb
class ApplicationRecord < ActiveRecord::Base
self.abstract_class = true
end
View _customer-form.html
<form name="form" ng-submit="vm.submitForm(vm.customer)" class="form-horizontal" novalidate>
<div class="panel panel-default">
<div class="panel-header">
<h2 class="panel-heading">
<span ng-if="!vm.customer.id">Adição de Cliente</span>
<span ng-if="vm.customer.id">Edição de Cliente</span>
</h2>
</div>
<div class="panel-body">
<fieldset>
View 1618.cpp
#include<iostream>
using namespace std;
int main(){
int entrada;
bool check = false;
cin >> entrada;
View gitconfig
# set your user tokens as environment variables, such as ~/.secrets
# See the README for examples.
[color]
ui = true
[color "branch"]
current = yellow reverse
local = yellow
remote = green
[color "diff"]
meta = yellow bold
View http.ruby
require 'net/http'
require 'time'
@response = Net::HTTP.get_response(URI('https://about.gitlab.com'))
puts "Response:"
puts @response.header.to_hash
def response
@response = Net::HTTP.get_response(URI('https://about.gitlab.com'))
end
@thiagovsk
thiagovsk / simple-twitter.rb
Created Aug 9, 2016 — forked from coderberry/simple-twitter.rb
Application oauth2 for Twitter using Ruby
View simple-twitter.rb
require 'oauth'
require 'httpclient'
require 'json'
class SimpleTwitter
def initialize(config)
@config = config
@http_client = HTTPClient.new
end
@thiagovsk
thiagovsk / helper.rb
Created May 16, 2016
criando modulo sendo incluido na classe como metodo de instancia e de classe
View helper.rb
module Foo
def self.included base
base.send :include, InstanceMethods
base.extend ClassMethods
end
module InstanceMethods
def bar1
'bar1'
end
@thiagovsk
thiagovsk / helper.rb
Created May 16, 2016
criando modulo sendo incluido na classe como metodo de instancia
View helper.rb
module Foo
def self.included base
base.extend ClassMethods
end
module ClassMethods
def bar2
puts 'bar2'
end
end
View .tmux.conf
############################
# _
# | |_ _ __ ___ _ ___ __
# | __| '_ ` _ \| | | \ \/ /
# | |_| | | | | | |_| |> <
# \__|_| |_| |_|\__,_/_/\_\
#
#############################
#
# COPY AND PASTE
View gist:43f8b34b5fc2ccc7a963
sem dependencia
ruby-jeweller https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=816744
ruby-sup-mail (esse é do ruby-xapian)
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=816486
ruby-thinking-sphinks
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=816307