Skip to content

Instantly share code, notes, and snippets.

View letanure's full-sized avatar
🎯
Focusing

luiz tanure letanure

🎯
Focusing
View GitHub Profile
@letanure
letanure / ribbon.js
Created September 25, 2017 22:35
ribbon via gtm
var docCookies = {
getItem: function (sKey) {
if (!sKey) { return null; }
return decodeURIComponent(document.cookie.replace(new RegExp("(?:(?:^|.*;)\\s*" + encodeURIComponent(sKey).replace(/[\-\.\+\*]/g, "\\$&") + "\\s*\\=\\s*([^;]*).*$)|^.*$"), "$1")) || null;
},
setItem: function (sKey, sValue, vEnd, sPath, sDomain, bSecure) {
if (!sKey || /^(?:expires|max\-age|path|domain|secure)$/i.test(sKey)) { return false; }
var sExpires = "";
if (vEnd) {
switch (vEnd.constructor) {
{
name: 'FORM NAME',
method: 'POST/GET',
action: '/url',
// beforeCreate
// afterCreate
fieldsets: [
{
label: 'name of group',
fields: [
@letanure
letanure / roreiro.md
Last active May 23, 2017 19:55
roteiro berlin

Primeiro, a lista resumida do roteiro:

  1. Alexanderplatz Weltzeituhr/ Relogio do mundo
  2. Berliner Fernsehturm/ Torre de televisao
  3. Neptunbrunnen/ Fonte de Netuno
  4. Marienkirche/ St Mary Church
  5. Rotes Rathaus/ Prefeitura vermelha
  6. Nikolaiviertel
  7. Ilha dos museus
@letanure
letanure / git_bible.md
Created January 31, 2017 10:48 — forked from dmglab/git_bible.md
how to git

Note: this is a summary of different git workflows putting together to a small git bible. references are in between the text


How to Branch

try to keep your hacking out of the master and create feature branches. the [feature-branch workflow][4] is a good median between noobs (i have no idea how to branch) and git veterans (let's do some rocket sience with git branches!). everybody get the idea!

Basic usage examples

@letanure
letanure / manifest.json
Created July 26, 2016 13:41 — forked from IzumiSy/manifest.json
Chrome.storage.sync example
{
"name": "SyncExtension",
"version": "0.1",
"manifest_version": 2,
"description": "Storage Sync Extension",
"permissions": [ "storage" ],
"browser_action": {
@letanure
letanure / backup-github.sh
Created July 7, 2016 14:06 — forked from rodw/backup-github.sh
A simple script to backup an organization's GitHub repositories, wikis and issues.
#!/bin/bash
# A simple script to backup an organization's GitHub repositories.
# NOTE: if you have more than 100 repositories, you'll need to step thru the list of repos
# returned by GitHub one page at a time, as described at https://gist.github.com/darktim/5582423
GHBU_BACKUP_DIR=${GHBU_BACKUP_DIR-"github-backups"} # where to place the backup files
GHBU_ORG=${GHBU_ORG-"<CHANGE-ME>"} # the GitHub organization whose repos will be backed up
# (if you're backing up a user's repos instead, this should be your GitHub username)
GHBU_UNAME=${GHBU_UNAME-"<CHANGE-ME>"} # the username of a GitHub account (to use with the GitHub API)
@letanure
letanure / article.md
Created June 14, 2016 12:38
More readable Javascript without variables

Motivation

  • lots of variables are a obstacle of understanding code
  • Variables introduce state, which in turn increase complexity. Ex.:
  • A boolean can have two states. Two booleans have four. etc

Imperative programming

  • Imperative programming is mainstream, is how the computers work
@letanure
letanure / app.js
Created June 14, 2016 12:21
Improving Angular performance with 1 line of code
//https://medium.com/swlh/improving-angular-performance-with-1-line-of-code-a1fb814a6476#.62frmdlt4
myApp.config(['$compileProvider', function ($compileProvider) {
$compileProvider.debugInfoEnabled(false);
}]);