- If you don't already have one, create a GitHub account
- Use the "Fork" button to fork the repository:
package main | |
import ( | |
"fmt" | |
"net" | |
"net/http" | |
"github.com/gorilla/mux" | |
) |
#!/usr/bin/env python3 | |
from abc import ABC, abstractmethod | |
class AbstractEdgeBuilder(ABC): | |
@abstractmethod | |
def build_edge(self): | |
pass |
#!/usr/bin/env python3 | |
from abc import ABC, abstractmethod | |
class AbstractFunction(ABC): | |
@abstractmethod | |
def install_function(self): | |
pass |
// helpful links: | |
// https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man2/EV_SET.2.html | |
// http://julipedia.meroh.net/2004/10/example-of-kqueue.html | |
// create kqueue | |
kq, err := syscall.Kqueue() | |
if err != nil { | |
log.Println("Error creating Kqueue descriptor!") | |
return | |
} |
import unicodedata | |
import re | |
""" | |
A remoção de acentos foi baseada em uma resposta no Stack Overflow. | |
http://stackoverflow.com/a/517974/3464573 | |
""" | |
def removerAcentosECaracteresEspeciais(palavra): |
package main | |
import ( | |
"encoding/json" | |
"fmt" | |
"io/ioutil" | |
"log" | |
"net/http" | |
"net/url" | |
"os" |
# Set variables in .bashrc file | |
# don't forget to change your path correctly! | |
export GOPATH=$HOME/golang | |
export GOROOT=/usr/local/opt/go/libexec | |
export PATH=$PATH:$GOPATH/bin | |
export PATH=$PATH:$GOROOT/bin |
var AWS = require('aws-sdk'); | |
AWS.config.update({ | |
accessKeyId: '{AWS_KEY}', | |
secretAccessKey: '{AWS_SECRET}', | |
region: '{SNS_REGION}' | |
}); | |
var sns = new AWS.SNS(); |
// Microrouter based on history.pushState. | |
// All thrills, no frills. | |
// Usage: | |
// | |
// var h = urlstate(callback); | |
// h.push('#foo') | |
function urlstate(callback) { | |
// Since `history.pushState` doesn't fire `popstate`, we can use this function | |
// instead. Will update history state and call `callback` with currently | |
// showing `url`. |