Skip to content

Instantly share code, notes, and snippets.

View aguimaraes's full-sized avatar

Alvaro Guimaraes aguimaraes

  • Modern Milkman LLC
  • Boston, MA, USA
  • 21:06 (UTC -04:00)
View GitHub Profile
@aguimaraes
aguimaraes / .smbpassword
Created November 4, 2015 12:01
~/.smbpassword
username=desenvolvimento
password=somosnos
@aguimaraes
aguimaraes / fstab
Created November 4, 2015 11:56
/etc/fstab
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
/dev/mapper/mint--vg-root / ext4 errors=remount-ro 0 1
# /boot was on /dev/sda1 during installation
UUID=55ba6e00-0c7d-4dd5-9304-f24bc949a101 /boot ext2 defaults 0 2
{
// an array of options to pass to jslint.
"options" : [
// examples using predef flag.
"--predef", "['angular', 'document', '\\$', '_', 'JQuery', 'FB', 'Ext', 'S1', 'console']"
// tolerate missing 'use strict' pragma.
,"--sloppy"
// suggest an indent level of two spaces.
,"--indent", "4"
Ext.data.writer.Json.override({
/*
* This function overrides the default implementation of json writer. Any hasMany relationships will be submitted
* as nested objects. When preparing the data, only children which have been newly created, modified or marked for
* deletion will be added. To do this, a depth first bottom -> up recursive technique was used.
*/
getRecordData: function(record) {
//Setup variables
var me = this, i, association, childStore, data = record.data;
Ext.define('KitchenSink.view.form.FormGrid', {
extend: 'Ext.form.Panel',
requires: [
'Ext.grid.*',
'Ext.form.*',
'Ext.layout.container.Column',
'KitchenSink.model.Company'
],
xtype: 'form-grid',
{
"color_scheme": "Packages/Color Scheme - Default/Monokai Bright.tmTheme",
"font_size": 10,
"highlight_line": true,
"ignored_packages":
[
"Vintage"
],
"indent_to_bracket": true,
"margin": 0,
Ext.Loader.setConfig({
enabled: true
});
Ext.Loader.setPath('Ext.ux', '../ux');
Ext.require([
//'Ext.form.*',
//'Ext.layout.container.Column',
//'Ext.tab.Panel'
'*',
select fancy_name, (select name from cities where id = persons.addr_city_id) as city, addr_uf,
(select count(*) from ctes where owner_id = persons.id and created_at >= '2015-06-01 00:00:00') as ctes,
(select count(*) from incomes where owner_id = persons.id and created_at >= '2015-06-01 00:00:00') as incomes
from persons
where owner_id is null
and ((select count(*) from ctes where owner_id = persons.id and created_at >= '2015-06-01 00:00:00') > 0
or (select count(*) from incomes where owner_id = persons.id and created_at >= '2015-06-01 00:00:00') > 0);
ALTER TABLE IF EXISTS transactions_has_categories DROP CONSTRAINT IF EXISTS transactions_has_categories_transaction_category_id_fk;
ALTER TABLE IF EXISTS transactions_has_categories DROP CONSTRAINT IF EXISTS transactions_has_categories_transaction_id_fk;
DROP TABLE IF EXISTS transactions_has_categories;
DROP TABLE IF EXISTS transaction_categories;
DROP TABLE IF EXISTS transactions;
CREATE TABLE transactions (
id SERIAL PRIMARY KEY,
transaction_id INTEGER,
owner_id INTEGER NOT NULL,
91076;1;27292;"Textil Javaneza LTDA";"MARCIA CRISTINA FERREIRA DE ALBUQUERQUE ME";"2015-06-11 18:17:58";"SP";"PB";7.00;8.35;0.00
91643;1;27344;"Textil Javaneza LTDA";"CLECIA LUCIA LTDA";"2015-06-15 18:08:40";"SP";"PE";7.00;3.84;0.00
91644;1;27345;"MC INDUSTRIA E CONFECÇOES LTDA";"darci araujo souza me";"2015-06-15 18:12:54";"SP";"RS";12.00;7.09;7.09
92857;1;27519;"J.T. Ativa Equipamentos de Segurança LTDA";"IRMAOS RAMOS LTDA ME";"2015-06-19 18:13:47";"SP";"ES";7.00;3.50;0.00
88851;1;27023;"BEGETONTEX COMERCIO DE PRODUTOS TEXTEIS";"GMTEX - INDUSTRIA DE CONFECCOES LTDA";"2015-06-01 15:27:39";"SP";"PR";12.00;408.00;0.00
91843;1;27364;"Textil Javaneza LTDA";"COMERCIAL SAO BENTO LTDA ME";"2015-06-16 15:35:21";"SP";"PA";7.00;8.20;0.00
92441;1;27444;"BEGETONTEX COMERCIO DE PRODUTOS TEXTEIS";"GMTEX - INDUSTRIA DE CONFECCOES LTDA";"2015-06-18 16:40:07";"SP";"PR";12.00;408.00;0.00
90516;1;27238;"Textil Javaneza LTDA";"M K ARTIGOS PARA CAMA MESA BANHO LTDA";"2015-06-09 08:11:33";"SP";"SC";0.00;0.00;0.00
93458;1;27621;"T