Skip to content

Instantly share code, notes, and snippets.


Igor C. de Paula IgorDePaula

View GitHub Profile
IgorDePaula / main.go
Created Feb 22, 2021 — forked from srbry/main.go
Golang lambda authorizer
View main.go
package main
import (
IgorDePaula / colors.go
Created Jan 28, 2021 — forked from ik5/colors.go
Simple golang expirement with ANSI colors
View colors.go
package main
// <- will not display the colors
import "fmt"
const (
InfoColor = "\033[1;34m%s\033[0m"
NoticeColor = "\033[1;36m%s\033[0m"
WarningColor = "\033[1;33m%s\033[0m"
ErrorColor = "\033[1;31m%s\033[0m"
DebugColor = "\033[0;36m%s\033[0m"
View AWSLambdaGenerateKeyPair.go
// Sample code used to generate a cryptographic key pair via an AWS Lambda function.
// (C) 2019 Nabla Zero Labs
// MIT License
package main
import (
IgorDePaula / Random-string
Created Jan 20, 2021 — forked from 6174/Random-string
Generate a random string in JavaScript In a short and fast way!
View Random-string
Math.random().toString(36).substring(2, 15) + Math.random().toString(36).substring(2, 15);
IgorDePaula / composer.json
Created Mar 22, 2020 — forked from andyshinn/composer.json
Docker Compose PHP Composer Example
View composer.json
"require": {
"mfacenet/hello-world": "v1.*"
IgorDePaula /
Created Jan 21, 2020 — forked from curran/
The Iris Dataset

This is the "Iris" dataset. Originally published at UCI Machine Learning Repository: Iris Data Set, this small dataset from 1936 is often used for testing out machine learning algorithms and visualizations (for example, Scatter Plot). Each row of the table represents an iris flower, including its species and dimensions of its botanical parts, sepal and petal, in centimeters.

The HTML page provides the basic code required to load the data and display it on the page (as JSON) using D3.js.

View makefile
include .env
.PHONY: help
help: ## Display this help
@awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m<target>\033[0m\n"} /^[a-zA-Z_-]+:.*?##/ { printf " \033[36m%-15s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST)
IgorDePaula / client.js
Created Nov 1, 2019 — forked from crtr0/client.js
A simple example of setting-up dynamic "rooms" for clients to join
View client.js
// set-up a connection between the client and the server
var socket = io.connect();
// let's assume that the client page, once rendered, knows what room it wants to join
var room = "abc123";
socket.on('connect', function() {
// Connected, let's sign-up for to receive messages for this room
socket.emit('room', room);
IgorDePaula /
Created Jul 3, 2019 — forked from benfrain/
post-receive hook for multiple branches
while read oldrev newrev ref
branch=`echo $ref | cut -d/ -f3`
if [ "master" == "$branch" ]; then
git --work-tree=./path/under/root/dir/live-site/ checkout -f $branch
echo 'Changes pushed live.'
IgorDePaula / cors.js
Created Jun 5, 2019 — forked from balupton/cors.js
Acheiving CORS via a Node HTTP Server
View cors.js
// Create our server
var server;
server = http.createServer(function(req,res){
// Set CORS headers
res.setHeader('Access-Control-Allow-Origin', '*');
res.setHeader('Access-Control-Request-Method', '*');
res.setHeader('Access-Control-Allow-Methods', 'OPTIONS, GET');
res.setHeader('Access-Control-Allow-Headers', '*');
if ( req.method === 'OPTIONS' ) {