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
| ntpdate -s ntp.ubuntu.com | |
| dpkg-reconfigure tzdata |
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
| # 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 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
| /** | |
| 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 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
| import { Pipe, PipeTransform } from '@angular/core'; | |
| @Pipe({name: 'truncate'}) | |
| export class Truncate implements PipeTransform { | |
| transform(value: string, args: string[]) : string { | |
| let limit = args.length > 0 ? parseInt(args[0], 10) : 10; | |
| let trail = args.length > 1 ? args[1] : '...'; | |
| return value.length > limit ? value.substring(0, limit) + trail : value; | |
| } | |
| } |
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
| #user nobody; | |
| worker_processes 1; | |
| #error_log logs/error.log; | |
| #error_log logs/error.log notice; | |
| #error_log logs/error.log info; | |
| #pid logs/nginx.pid; |
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
| import Foundation | |
| extension Array { | |
| func shuffle() -> Array { | |
| var result = Array(self) | |
| result.shuffleInPlace() | |
| return result | |
| } |
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
| def formatar_valor_BRL(valor) | |
| ActionController::Base.helpers.number_to_currency(valor, :unit => "R$ ", :separator => ",", :delimiter => ".") | |
| end |
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
| def number_to_currency_br(number) | |
| number_to_currency(number, :unit => "R$ ", :separator => ",", :delimiter => ".") | |
| end |
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
| import java.util.List; | |
| import java.util.Map; | |
| public interface DAO { | |
| public Boolean save(Map<?, ?> param); | |
| public List<?> getAll(); | |
| } |
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
| #!/usr/bin/env ruby | |
| # | |
| require 'fileutils' | |
| puts "Started @ #{Time.now}" | |
| starting_point = "./output" | |
| structure_count = 282344 | |
NewerOlder