http://getherbert.com/ http://wpgear.org/ http://www.titanframework.net/ https://github.com/theantichris/WordPress-Plugin-Boilerplate https://github.com/gndev/sunrise http://wordpressfuel.pluginpunch.com/
#Manipulação de datas
#Programação funcional
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// IIFE - Immediately Invoked Function Expression | |
// Serve para criar um contexto de execução e proteger as Variaveis / Funcoes / Obj e nao deixar elas em contexto global. | |
;(function(global, $) { | |
// 'new' gera um objeto vazio. | |
// Esse é o metodo construtor, que chama outro metodo o: init e retorna o objeto. | |
var PluginName = function(variable1, variable2) { | |
// Isso faz com que o plugin possa ser usado sem precisar ficar dando new | |
return new PluginName.init(variable1, variable2); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var filmes = [ | |
{ name: 'Matrix', genero: 'acao'} | |
,{ name: 'Mad Max', genero: 'acao'} | |
,{ name: 'Interestelar', genero: 'ficcao cientifica'} | |
,{ name: 'A origem', genero: 'ficcao cientifica'} | |
,{ name: 'Seven', genero: 'policial'} | |
]; | |
var hasGenero = function(genero){ | |
return function(obj){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* ES5 */ | |
var adder = function(x){ | |
return function(y){ | |
return x+y; | |
}; | |
} | |
adder(5)(5) | |
// 10 | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set nocompatible " be iMproved, required | |
filetype off " required | |
set tabstop=2 softtabstop=0 expandtab shiftwidth=2 smarttab | |
" set the runtime path to include Vundle and initialize | |
set rtp+=~/.vim/bundle/Vundle.vim | |
call vundle#begin() | |
" alternatively, pass a path where Vundle should install plugins | |
"call vundle#begin('~/some/path/here') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"os" | |
"os/exec" | |
"syscall" | |
) | |
func main() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Adds a team to all the repos in a Github organization. This is a tedious | |
* process in the UI. You'll need a newer version of node to run this (e.g 9+) | |
* because it uses async/await. | |
* | |
* Instructions: | |
* | |
* 1. Copy this file somewhere on your computer, e.g. ~/addteamrepos.js | |
* 2. Fill in the uppercase variables below with the right values | |
* 3. Run this file: `$ node ~/addteamrepos.js` |
OlderNewer