Skip to content

Instantly share code, notes, and snippets.

View marcocarvalho's full-sized avatar

Marco Carvalho marcocarvalho

  • mcorp.io
  • Curitiba - PR - Brasil
View GitHub Profile
sed -i -e 's/1\.11\.\*/1\.12\.\*/g' $(find . -name AssemblyInfo.cs)
@marcocarvalho
marcocarvalho / restaurar_base.bat
Last active July 28, 2016 15:10
Restaurar Banco no Firebird
gbak -g -c -z -rep Banco.gbk AZC30IB.GDB -user sysdba -pass masterkey
@marcocarvalho
marcocarvalho / gist:0d3bd7d61632dd54c174539038be582e
Created July 18, 2016 18:02
List Packages from a .NET C# project
Get-Package | Select-Object -Unique Id,LicenseUrl,Version | Format-List
upstream unicorn_server {
server unix:/tmp/unicorn.sock fail_timeout=0;
}
server {
listen 80;
root /usr/src/app/public;
try_files $uri @unicorn_server;
@marcocarvalho
marcocarvalho / yardoc_cheatsheet.md
Last active August 29, 2015 14:26 — forked from chetan/yardoc_cheatsheet.md
YARD cheatsheet

YARD CHEATSHEET http://yardoc.org

cribbed from http://pastebin.com/xgzeAmBn

Templates to remind you of the options and formatting for the different types of objects you might want to document using YARD.

Modules

Namespace for classes and modules that handle serving documentation over HTTP

Capybara

save_and_open_page

Matchers

have_button(locator)
#!/bin/bash
sudo aptitude update
sudo aptitude -y install build-essential openssl libreadline6 libreadline6-dev zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-0 libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev autoconf libc6-dev libncurses5-dev automake libtool bison subversion libffi-dev
dpkg -l linux-* | grep -v libc | awk '/^ii/{ print $2}' | grep -v -e `uname -r | cut -f1,2 -d"-"` | grep -e [0-9] | xargs sudo apt-get -y purge
@marcocarvalho
marcocarvalho / seeds.rb
Last active December 23, 2015 02:49 — forked from dcrec1/seeds.rb
states = <<STATES
AC,Acre
AL,Alagoas
AP,Amapá
AM,Amazonas
BA,Bahia
CE,Ceará
ES,Espírito Santo
GO,Goiás
MA,Maranhão
@marcocarvalho
marcocarvalho / excel_spreedsheet_column_notation_calculator
Last active December 21, 2015 21:08
Excel / SpreedSheet column notation calculator in ruby
#!/usr/bin/env ruby
module Spreedsheet
module ColumnNotation
def seed
@seed ||= ('A'..'Z').to_a
end
def position_to_column_notation(num, minus = 0)
m = num.divmod(seed.size)