This file contains 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
# | |
# RED - Error | |
# GREEN - Success | |
# - Flashing: 1 or more problems | |
# - 2 Flashing in a row: requesting data | |
# | |
import mypi.led | |
import mypi.url | |
# |
This file contains 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
ntpdate -s ntp.ubuntu.com | |
dpkg-reconfigure tzdata |
This file contains 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
// | |
// Screen Scraping in Go Lang | |
// | |
// Lib: | |
// go get github.com/PuerkitoBio/goquery | |
// | |
package main | |
import ( | |
"fmt" |
This file contains 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
# | |
# Reference: | |
# https://pt.slideshare.net/RaPz1/build-golang-projects-properly-with-makefiles | |
# | |
BINARY=s3upload | |
VERSION=1.0.0 | |
BUILD=`date +%FT%T%z` | |
HASH=`git rev-parse HEAD` |
This file contains 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
#!/usr/bin/ruby | |
# | |
# This script helps to deploy static content to a S3 bucket. | |
# | |
# Send the content from options[:dist_dir] to option[:bucket] | |
# Also apply the CACHE_CONTROL and EXPIRES header to the files. | |
# The params can be changed on CACHE_CONTROL_METADATA and EXPIRES_METADATA | |
# constants previously. | |
# |
This file contains 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
# | |
# Brewfile | |
# https://robots.thoughtbot.com/brewfile-a-gemfile-but-for-homebrew | |
# | |
brew install cask | |
brew install git | |
brew install npm | |
brew install heroku | |
brew install openssl |
This file contains 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
# Define America/Sao_Paulo | |
echo America/Sao_Paulo >/etc/timezone; dpkg-reconfigure -f noninteractive tzdata | |
# Sync clock | |
docker run --rm --privileged mangar/rails-pg:5.0.2.1 hwclock -s | |
echo "Enjoy!" |
This file contains 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
/** | |
function sendEmails() { | |
var sheet = SpreadsheetApp.getActiveSheet(); | |
var startRow = 2; // First row of data to process | |
var numRows = 2; // Number of rows to process | |
// Fetch the range of cells A2:B3 | |
var dataRange = sheet.getRange(startRow, 1, numRows, 2) | |
// Fetch values for each row in the Range. |
This file contains 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
FROM mangar/rails-pg:5.0.0 | |
# docker build -t mangar/rails-pg:5.0.0.1 . | |
MAINTAINER Marcio Mangar "marcio.mangar@gmail.com" | |
RUN apt-get update && apt-get install -y ghostscript | |
RUN gem install rails -v 5.0.0.1 |
This file contains 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
import { Pipe, PipeTransform } from '@angular/core'; | |
@Pipe({name: 'toArray'}) | |
export class ToArray implements PipeTransform { | |
transform(value: number, exponent: string[]): number { | |
let res = []; | |
for (let i = 1; i <= value; i++) { | |
res.push(i); | |
} | |
return res; |
NewerOlder