Skip to content

Instantly share code, notes, and snippets.

View kaumac's full-sized avatar

Kaue Miyauti Machado kaumac

View GitHub Profile
create or replace function create_property (
property_name text,
property_description text default null,
property_organization bigint default null,
address_location geography default null,
address_city text default null,
address_country text default null,
address_district text default null,
address_formatted text default null,
address_housenumber text default null,
import React from 'react';
import styled from 'styled-components';
import { variant } from 'styled-system';
import { base, colors, shadows } from 'theme';
import Box from '../Box';
const BaseInput = styled('input')`
transition: all ${base.transition};
@kaumac
kaumac / bestPractices.js
Created September 29, 2016 16:21
Weird Mocha behavior regarding scope
/*
Running code on Chrome's console, the output on line 10 is "undefined" as we're wrapping everything inside an IIFE,
which creates a new scope so nothing is exposed to the global scope unless its intentional like we did on line 9.
*/
(function() {
let myObject = {
name : 'Jory'
};
window.myWindowObject = {
name: 'Kaue'
@kaumac
kaumac / init.coffee
Last active March 20, 2016 20:53
My Atom Settings
# Your init script
#
# Atom will evaluate this file each time a new window is opened. It is run
# after packages are loaded/activated and after the previous editor state
# has been restored.
#
# An example hack to log to the console when each text editor is saved.
#
# atom.workspace.observeTextEditors (editor) ->
# editor.onDidSave ->
@kaumac
kaumac / gist:de6f5126c04d5c210dd2
Created June 7, 2015 16:15
Firebase companies and employees data structure
{
companies: {
cmp0001: {
name: "Happy company"
employees: {
u0001: "admin",
u0002: "manager"
}
},
cmp0002: {
'use strict';
// The Angular App
angular.module('kiikPanel', [
'ngCookies',
'ngResource',
'ngSanitize',
'Devise',
'ngAnimate',
'ui.router'
=> Meteor 0.6.6.2 is available. Update this project with 'meteor update'.
npm: updating npm dependencies -- googleapis, moment, debug, crypto-js...
=> Meteor server running on: http://localhost:3000/
events.js:71
throw arguments[1]; // Unhandled 'error' event
^
Error: listen EADDRINUSE
at errnoException (net.js:770:11)
at Server._listen2 (net.js:910:14)
@kaumac
kaumac / gist:6401416
Created August 31, 2013 23:57
Xiiiiiiii...
Your app is crashing. Here's the latest log.
W20130831-20:53:18.456(-3)? (STDERR) /Users/kaumac/.meteor/tools/3cba50c44a/lib/node_modules/fibers/future.js:173
W20130831-20:53:18.457(-3)? (STDERR) throw(ex);
W20130831-20:53:18.457(-3)? (STDERR) ^
W20130831-20:53:18.468(-3)? (STDERR) TypeError: Object #<Object> has no method 'mixin'
W20130831-20:53:18.470(-3)? (STDERR) at packages/underscore-string/common.js:1
W20130831-20:53:18.471(-3)? (STDERR) at packages/underscore-string.js:561:4
W20130831-20:53:18.471(-3)? (STDERR) at packages/underscore-string.js:568:3
W20130831-20:53:18.472(-3)? (STDERR) at mains (/Users/kaumac/livecode/.meteor/local/build/programs/server/boot.js:153:10)
<?php
if(isset($_POST['email'])) {
// EDIT THE 2 LINES BELOW AS REQUIRED
$email_to = "[email protected]";
$email_subject = "Form teste";
function died($error) {
// your error code can go here
$.fn.trocaBanner = function(diaInicial,horaInicial,minutoInicial,diaFinal,horaFinal,minutoFinal,novaImagem){
var dia = new Date(),
diaAtual = dia.getDay(),
horaAtual = dia.getHours(),
minutoAtual = dia.getMinutes(),
diaDaSemana = [
'Segunda',
'Terca',
'Quarta',