Skip to content

Instantly share code, notes, and snippets.

View glauco's full-sized avatar

Glauco Oliveira glauco

View GitHub Profile

Keybase proof

I hereby claim:

To claim this, I am signing this object:

Keybase proof

I hereby claim:

To claim this, I am signing this object:

@glauco
glauco / select.sql
Last active September 29, 2015 20:43
SELECT t.test_id, t.run_count, t.success, t.failure, t.run_time
FROM tests t
JOIN test_runs tr
ON t.id = tr.test_id
JOIN run_metadata rm
ON rm.run_id = tr.run_id
AND rm.key = 'build_name'
AND rm.value = 'gate-tempest-dsvm-postgres-full'
GROUP BY t.test_id, t.run_count, t.success, t.failure, t.run_time
@glauco
glauco / bootstrap-puppetdb.sh
Last active August 29, 2015 14:25
bootstrap-puppetdb.sh
#!/bin/bash
apt-get update
apt-get upgrade -y
apt-get install git -y
git clone https://git.openstack.org/openstack-infra/system-config /opt/system-config/production
/opt/system-config/production/install_puppet.sh
export REAL_HOSTNAME=puppetdb.openstack.org
bash /opt/system-config/production/install_modules.sh
@glauco
glauco / macros.c
Created December 20, 2014 00:07
Programming in Pascal using C
#define begin {
#define end }
#define writeln(message) printf("%s\n", message)
#include <stdio.h>
int main()
begin
writeln("Hello, World!");
end
@glauco
glauco / gist:074c411c52ab5e2b9545
Last active August 29, 2015 14:10
Why Javascript sucks, and why it does not matter
The idea is to, guided by examples, explain what are the quicks of Javascript in order to explain why there is so much hate around the language. The main goal is to show you that even with all these problems it does not matter at all.
require 'set'
class Lottery
@max = 0
def generate_lottery_cards(amount, numbers_per_game)
games = []
randoms = Random.new
@glauco
glauco / gist:3136604
Created July 18, 2012 14:44
BaseTest
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.SqlClient;
namespace MT.SmsNavigationFactory.Tests
{
public abstract class BaseTest
{
@glauco
glauco / gist:3020212
Created June 29, 2012 19:42
Corrigindo problemas de locale no Jekyll

Ao executar o Jekyll estava recebendo o seguinte erro:

/Users/glauco/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require': iconv will be deprecated in the future, use String#encode instead.
Configuration from /Users/glauco/Github/glauco.github.com/_config.yml
Building site: . -> ./_site
/Users/glauco/.rvm/gems/ruby-1.9.3-p194/gems/jekyll-0.11.2/lib/jekyll/convertible.rb:29:in `read_yaml': invalid byte sequence in US-ASCII (ArgumentError)
	from /Users/glauco/.rvm/gems/ruby-1.9.3-p194/gems/jekyll-0.11.2/lib/jekyll/layout.rb:31:in `initialize'
	from /Users/glauco/.rvm/gems/ruby-1.9.3-p194/gems/jekyll-0.11.2/lib/jekyll/site.rb:113:in `new'
	from /Users/glauco/.rvm/gems/ruby-1.9.3-p194/gems/jekyll-0.11.2/lib/jekyll/site.rb:113:in `block in read_layouts'