Skip to content

Instantly share code, notes, and snippets.

View abacha's full-sized avatar

Adriano Bacha abacha

  • São Paulo, SP
  • 22:21 (UTC -03:00)
View GitHub Profile
class Cliente {
void salvar();
void deletar();
}
class Receita {
private Cliente cliente;
public Receita(Cliente cliente) {
this.cliente = cliente
@abacha
abacha / teste.java
Last active October 21, 2015 13:37
class Retangulo {
int largura, altura;
void setAltura(int altura) {
this.altura = altura;
}
void setLargura(int largura) {
this.largura = largura;
}
@abacha
abacha / teste.java
Last active October 20, 2015 20:47
class FormaGeometrica { }
class Quadrado implements FormaGeometrica {
int lado;
}
class Retangulo implements FormaGeometrica {
int ladoA, ladoB;
}
on ^*:hotlink:*//*.*:*:{ }
on *:hotlink:*//*.*:*: http $1
on ^*:hotlink:*www.*:*:{ }
on *:hotlink:*www.*:*: http $1
alias http {
on ^*:hotlink:*//*.*:*:{ }
on *:hotlink:*//*.*:*: http $1
on ^*:hotlink:*www.*:*:{ }
on *:hotlink:*www.*:*: http $1
alias http {
~/projects/graphite-web/examples (master ✔‹ruby-2.0.0›) curl -H 'Accept-Content: application/json' http://localhost/graphite/render\?target\=system.loadavg_1min\&format\=json
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">
<!-- Copyright 2008 Orbitz WorldWide
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
name: bigbang
root: /var/www/bigbang/releases
pre_window: rvm use 2.0.0@bigbang
tmux_options: -S /tmp/bigbang
windows:
- bigbang: tail -f ../current/log/production.log
- sidekiq: tail -f ../current/log/sidekiq.log
- unicorn: tail -f ../current/log/unicorn.stderr.log
- nginx: tail -f /var/log/nginx/error.log
- console: rails c
start on runlevel [2]
stop on runlevel [016]
console owner
setuid ubuntu
pre-start exec start_unicorn
post-stop exec kill `cat /var/www/bigbang/current/tmp/pids/unicorn.pid`
respawn
<?
function print_combo($id) {
$combo = "<select>";
while( has_sub_field('select_'.$id) ) {
$combo .= "<option value='".the_sub_field('link_externo')."'>";
$combo .= the_sub_field('texto');
$combo .= "</option>";
}
$combo .= "</select>";
return $combo;
Type SQL Duration (ms)
Client Load SELECT `clients`.* FROM `clients` WHERE `clients`.`id` = 85 LIMIT 1 148.472
HistoricBalance Load SELECT `historic_balances`.* FROM `historic_balances` INNER JOIN `funds` ON `funds`.`id` = `historic_balances`.`fund_id` WHERE (date <= '2013-09-30' AND fund_id = 705 AND caution = 0) ORDER BY historic_balances.date desc, historic_balances.id desc 5.111
HistoricBalance Load SELECT `historic_balances`.* FROM `historic_balances` INNER JOIN `funds` ON `funds`.`id` = `historic_balances`.`fund_id` WHERE `historic_balances`.`account_id` = 237 AND (date <= '2013-09-30' AND fund_id = 705 AND caution = 0) AND (amount > 0 ) ORDER BY historic_balances.date desc, historic_balances.id desc 3.374
Transaction Load SELECT `transactions`.* FROM `transactions` WHERE (value_date <= '2013-09-30' AND fund_id = 705 AND transactions.caution = 0 AND transactions.status_cd != 3) 3.257
HistoricBalance Load SELECT `historic_balances`.* FROM `historic_balances` INNER JOIN `funds` ON `funds`.`id` = `historic