Skip to content

Instantly share code, notes, and snippets.

View rodrigodealer's full-sized avatar

Rodrigo Oliveira rodrigodealer

View GitHub Profile
@rodrigodealer
rodrigodealer / gist:e657ae43876ee5094c6131291f9547fb
Last active April 28, 2022 13:44
Fuhrerschein - buegeramt
#!/usr/bin/env ruby
require 'watir'
def log (message) puts " #{message}" end
def success (message) puts "+ #{message}" end
def fail (message) puts "- #{message}" end
def notify (message)
success message.upcase
system 'osascript -e \'Display notification "Bürgerbot" with title "%s"\'' % message
rescue StandardError => e

Keybase proof

I hereby claim:

  • I am rodrigodealer on github.
  • I am rodrigodealer (https://keybase.io/rodrigodealer) on keybase.
  • I have a public key ASAw-MH97Nm-DqXTEk5i6Ja4nFclXdZ94mDCJRvaFXMA9Qo

To claim this, I am signing this object:

@rodrigodealer
rodrigodealer / go-os-arch.md
Created February 27, 2019 15:41 — forked from asukakenji/0-go-os-arch.md
Go (Golang) GOOS and GOARCH

Go (Golang) GOOS and GOARCH

All of the following information is based on go version go1.8.3 darwin/amd64.

A list of valid GOOS values

(Bold = supported by go out of the box, ie. without the help of a C compiler, etc.)

  • android
  • darwin
@rodrigodealer
rodrigodealer / anmeldung.rb
Created September 7, 2017 08:40
Anmeldung for berlin
#!/usr/bin/env ruby
# make sure you the watir gem installed -> gem install watir
require 'watir'
def log (message) puts " #{message}" end
def success (message) puts "+ #{message}" end
def fail (message) puts "- #{message}" end
def notify (message)
success message.upcase
system 'osascript -e \'Display notification Burgerbot with title "%s"\'' % message
rescue StandardError => e
@rodrigodealer
rodrigodealer / default.vcl
Created August 28, 2013 22:18
Simple varnish setup
backend default {
.host = "127.0.0.1";
.port = "80";
}
sub vcl_recv {
if(req.url ~ "sign_in" || req.url ~ "sign_out" || req.request == "POST" || req.request == "PUT" || req.request == "DELETE") {
return (pass);
}
@rodrigodealer
rodrigodealer / app.conf
Last active October 13, 2015 07:28 — forked from shapeshed/unicorn
Unicorn / Monit setup
RAILS_ENV=production
RAILS_ROOT=/home/deploy/apps/app/current
USER=deploy
START_CMD="/home/deploy/.rbenv/shims/bundle exec unicorn -c config/unicorn.rb -E production -D"
UNICORN_CONFIG=$RAILS_ROOT/config/unicorn.rb
PID="/home/deploy/shared/pids/unicorn.pid"
@rodrigodealer
rodrigodealer / gist:1835923
Created February 15, 2012 14:02
Json serialization for vraptor
package br.com.pordotom.util;
import br.com.caelum.vraptor.interceptor.TypeNameExtractor;
import br.com.caelum.vraptor.ioc.Component;
import br.com.caelum.vraptor.serialization.ProxyInitializer;
import br.com.caelum.vraptor.serialization.xstream.XStreamBuilder;
import br.com.caelum.vraptor.serialization.xstream.XStreamJSONSerialization;
import com.thoughtworks.xstream.XStream;
import com.thoughtworks.xstream.converters.basic.DateConverter;
@rodrigodealer
rodrigodealer / httpd.conf
Created October 17, 2011 11:26
Gzip, Expires e Proxypass no Apache2
<Location />
# AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/css image/gif image/png image/jpg
# SetOutputFilter DEFLATE
# BrowserMatch ^Mozilla/4 gzip-only-text/html
# BrowserMatch ^Mozilla/4\.0[678] no-gzip
# BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
# AddOutputFilterByType DEFLATE text/html text/plain text/css image/gif image/png image/jpg application/x-javascript
# BrowserMatch ^Mozilla/4 gzip-only-text/html
# BrowserMatch ^Mozilla/4\.0[678] no-gzip
# BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
@rodrigodealer
rodrigodealer / default
Created July 29, 2011 14:38
nginx for node.js using socket.io
worker_processes 4;
events {
worker_connections 1024;
}
http {
server {
listen 80;
gzip on;
@rodrigodealer
rodrigodealer / build.xml
Created April 24, 2011 19:04
Ivy example
<project name="hello-ivy" default="run" xmlns:ivy="antlib:org.apache.ivy.ant">
<property name="lib.dir" value="lib" />
<property name="build.dir" value="build" />
<property name="src.dir" value="src" />
<!-- paths used for compilation and run -->
<path id="lib.path.id">
<fileset dir="${lib.dir}" />
</path>