Skip to content

Instantly share code, notes, and snippets.

@bernbecht
bernbecht / gist:8af3888092dfa381a807
Last active August 29, 2015 14:16
Calcula +30 dias a partir de um mês
var actualDate = new Date(2009,11,24);
var date = actualDate.getDate().toString();
var month = actualDate.getMonth().toString();
var year = actualDate.getFullYear().toString();
var testDate = new Date(year, month, date);
console.log("Antes");
console.log(actualDate);
@bernbecht
bernbecht / gist:d1a8ae38d520a52f61e0
Created March 12, 2015 22:11
Get -30 days from a date
var actualDate = new Date(2009,02,31);
var date = actualDate.getDate().toString();
var month = actualDate.getMonth().toString();
var year = actualDate.getFullYear().toString();
var testDate = new Date(year, month, date);
console.log("Antes");
@bernbecht
bernbecht / example-all-components.html
Created July 31, 2015 17:12
BO | Múltiplos Charts.html
<ion-view title="COMPONENTES">
<div class="separador-exemple"><span>SEARCH BOX</span></div>
<ion-content class="has-header">
<div class="row">
<div class="col">
<chart type="bar"></bar-chart>
</div>
<div class="col">
<chart chart-id="fixed" chart-data="fixedChartData" type="bar"></bar-chart>
@bernbecht
bernbecht / profile
Created February 29, 2016 21:50
Alias
# -------------------------------------------------------------------
# Git
# -------------------------------------------------------------------
alias ga='git add'
alias gp='git push'
alias gl='git log'
alias gs='git status'
alias gd='git diff'
alias gm='git commit -m'
alias gma='git commit -am'
@bernbecht
bernbecht / .zshrc
Last active April 3, 2016 13:44
Lua Bash Profile Exports
# Path to your oh-my-zsh installation.
export ZSH=/Users/bernardo/.oh-my-zsh
# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
ZSH_THEME="gianu"
# Uncomment the following line to use case-sensitive completion.
@bernbecht
bernbecht / fonts.scss
Created March 9, 2016 01:32
Creating many classes for font-icons using SCSS
@font-face {
font-family: 'icomoon';
src: url('../font/font-icons.eot');
src: url('../font/font-icons.eot#iefix') format('embedded-opentype'),
url('../font/font-icons.woff') format('woff'),
url('../font/font-icons.ttf') format('truetype'),
url('../font/font-icons.svg#font-icons') format('svg');
font-weight: normal;
font-style: normal;
}
@bernbecht
bernbecht / workflow.md
Last active June 17, 2022 12:41
Lua Front-end Wrokflow

Front-end workflow v1.0

Topics

 - Preprocessor;
 - Task runner;
 - Scaffolding;
 - Code style;
  • Pendências da documentação
@bernbecht
bernbecht / decorator.js
Last active March 18, 2016 01:23
Decorator Design Pattern for JS
var Task = function (name) {
this.name = name;
this.completed = false;
//implicit return this here;
}
Task.prototype.save = function() {
console.log("saving...");
}
@bernbecht
bernbecht / find-branch.sh
Created April 5, 2016 12:09
Find a branch in certain repos
#!/bin/bash
REPO_NAMES=(
hiroto
izumi
kato
kaze
kishimoto
kojima
kuwabara
kurono
@bernbecht
bernbecht / ctrl.controller.js
Created April 6, 2016 16:36
controller skelleton
(function() {
function ${name}Controller($scope)
}
${name}Controller.$inject = [
'$scope',
];
angular.module('${name}')