Skip to content

Instantly share code, notes, and snippets.

View antoniosb's full-sized avatar

Antônio Augusto antoniosb

View GitHub Profile
module Shoulda
module Matchers
module ActiveRecord
# https://gist.github.com/mackato/6972768
def have_store_accessor(key)
HaveStoreAccessor.new(key)
end
class HaveStoreAccessor
def initialize(key)
@antoniosb
antoniosb / perfectelementary.bash
Created May 11, 2016 03:41
HowTo Install the perfect Elementary-OS
#Download Elementary OS from here:
#http://sourceforge.net/projects/elementaryos/files/stable/
#First you update your system
sudo apt-get update && sudo apt-get dist-upgrade
#Install Google Chrome
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
sudo sh -c 'echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list'
Batman - Alef
Robin - Ruas
Majinbu - Lucas
Ben 10 - Gui
Psylocke - Laura
O Fera - Waldir
Honda - Cairo
Hancok - Tunico
Lanterna Verde - Leandrão
Hulk - Milk
@antoniosb
antoniosb / gist:50acd9bcbce5fec0d07799f49d4cc67b
Created March 8, 2017 18:25 — forked from bkimble/gist:1365005
List local memcached keys using Ruby
#!/usr/bin/env ruby
# List all keys stored in memcache.
# Credit to Graham King at http://www.darkcoding.net/software/memcached-list-all-keys/ for the original article on how to get the data from memcache in the first place.
require 'net/telnet'
headings = %w(id expires bytes cache_key)
rows = []
@antoniosb
antoniosb / plugin.sh
Created April 5, 2018 13:03
Create rspec rails plugin
# http://stackoverflow.com/questions/8507798/rails-3-1-plugin-gem-dummy-test-app-rspec
# http://namick.tumblr.com/post/17663752365/how-to-create-a-gemified-plugin-with-rails-3-2-rspec
rails plugin new plugin_name --skip-test-unit --dummy-path=spec/dummy
cd plugin_name
# Add rspec-rails to gemspec dev deps
# s.add_development_dependency "rspec-rails"
bundle install
@antoniosb
antoniosb / add-team-to-repos.js
Last active April 9, 2024 18:55 — forked from davidrleonard/add-team-to-repos.js
Add a new team to all Github repos in an organization
/*
* Adds a team to all the repos in a Github organization. This is a tedious
* process in the UI. You'll need a newer version of node to run this (e.g 9+)
* because it uses async/await.
*
* Instructions:
*
* 1. Copy this file somewhere on your computer, e.g. ~/addteamrepos.js
* 2. Fill in the uppercase variables below with the right values
* 3. Run this file: `$ node ~/addteamrepos.js`