Skip to content

Instantly share code, notes, and snippets.

👨‍🏫
Teaching

Luiz Picolo ツ luizpicolo

👨‍🏫
Teaching
Block or report user

Report or block luizpicolo

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View AcessandoAPIdoYouTube.ino
#include <SerialDisplay.h>
#include <ArduinoJson.h>
#include <ESP8266WiFi.h>
#include <WiFiClientSecure.h>
char ssid[] = "NOME_DA_REDE"; // sua rede wifi
char password[] = "SENHA_DA_REDE"; // sua senha
char channelId[] = "ID_DO_CANAL"; // ID do seu canal
char apiKey[] = "CHAVE_DA_API"; // chave da API
SerialDisplay displays(14, 12, 10); // (data D5, clock D6, qtde de modulos)
WiFiClientSecure client;
@taq
taq / gist:1ef38725c39c041f59701f29a83c7fa3
Created Oct 11, 2016
Git alias to create a new remote branch based on the current branch
View gist:1ef38725c39c041f59701f29a83c7fa3
Just insert on .gitconfig:
nrb = "!f() { git push -u origin $(git rev-parse --abbrev-ref HEAD):$1; }; f"
And then, when on a local branch and want to push to a new remote branch called, say, 'test':
$ git nbr test
Total 0 (delta 0), reused 0 (delta 0)
To <your remote here>
* [new branch] work -> test
@matiaskorhonen
matiaskorhonen / sign-pdf.rb
Last active Dec 28, 2019
Quick and dirty PDF signing in Ruby (using Origami)
View sign-pdf.rb
#!/usr/bin/env ruby
require "openssl"
require "time"
begin
require "origami"
rescue LoadError
abort "origami not installed: gem install origami"
end
@ericoporto
ericoporto / ywcc_ptbr.py
Created Jul 28, 2015
Yahoo Weather API Condition Codes in Brazilian Portuguese (Códigos do Yahoo Weather em Português - Brasil)
View ywcc_ptbr.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2015 Erico Vieira Porto
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
View Tabuleiro-de-Xadrez.markdown
View install_server.sh
# Configure Timezone
dpkg-reconfigure tzdata
# Configure locale
locale-gen pt_BR pt_BR.UTF-8
locale-gen en_US en_US.UTF-8
# Instalar Postgree e trocar senha
sudo apt-get install postgresql postgresql-contrib
psql -c "ALTER USER postgres WITH PASSWORD 'nova_senha'" -d template1
@joshteng
joshteng / dokku_setup.md
Last active May 15, 2019
Using Dokku to deploy a Rails Application
View dokku_setup.md

#Goal Deploy your Rails App super easily with Dokku on Digital Ocean cheap cheap!

##Notes

  • Follow 12 factor design (include the rails_12factor gem)
  • Don't forget your Procfile with the command to start up your application server
  • I prefer using external hosted logging services like Logentries (not in this guide)
  • Set up performance monitoring AppSignal or New Relic (not in this guide)
@luizpicolo
luizpicolo / install.sh
Last active Sep 7, 2016
Auto Installer
View install.sh
#!/bin/bash
# install zsh
rm -fr .oh-my-zsh/
curl -L http://install.ohmyz.sh > install.sh
sh install.sh
# add final .zshrc
echo 'source ~/.bash_aliases' >> ~/.zshrc
echo '[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"' >> >> ~/.zshrc
@emad-elsaid
emad-elsaid / gravatar.rb
Created Mar 7, 2014
Gravatar image url generator simple method Gravatar image url generator simple method
View gravatar.rb
#!/usr/bin/env ruby
require 'digest/md5'
require "addressable/uri"
# this is based on gravatar image API
# https://en.gravatar.com/site/implement/images/
# options :
# size : <integer> size of image
# default: <string> url of image if email not found or:
# * 404
@Senhordim
Senhordim / ui.datepicker-pt-BR.js
Created Dec 28, 2013
Tradução datepicker pt-BR
View ui.datepicker-pt-BR.js
/* Brazilian initialisation for the jQuery UI date picker plugin. */
/* Written by Leonildo Costa Silva (leocsilva@gmail.com). */
jQuery(function($){
$.datepicker.regional['pt-BR'] = {
closeText: 'Fechar',
prevText: '&#x3c;Anterior',
nextText: 'Pr&oacute;ximo&#x3e;',
currentText: 'Hoje',
monthNames: ['Janeiro','Fevereiro','Mar&ccedil;o','Abril','Maio','Junho',
'Julho','Agosto','Setembro','Outubro','Novembro','Dezembro'],
You can’t perform that action at this time.