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 bash | |
############### USAGE ############### | |
# | |
# 1. Create a new workspace on Cloud9 using the "Blank" template | |
# | |
# 2. Run this command in the console: | |
# bash <(curl -fsSL https://gist.githubusercontent.com/padde/3c6301f15cbd5025e131740dae33aa95/raw/c9-elixir.sh) | |
# | |
# 3. There is no step 3! |
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 normalize_volume(file) | |
output = `ffmpeg -i '#{file}' -af "volumedetect" -f null /dev/null 2>&1` | |
raise "Error getting audio volume from #{file} (#{$?})" unless $?.success? | |
max_volume = output.scan(/max_volume: ([\-\d\.]+) dB/).flatten.first | |
mean_volume = output.scan(/mean_volume: ([\-\d\.]+) dB/).flatten.first | |
return if !max_volume || !mean_volume | |
max_volume = max_volume.to_f | |
mean_volume = mean_volume.to_f | |
target_volume = -14.0 | |
adjustment = target_volume - mean_volume |
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
#language: pt-br | |
Funcionalidade: Pagamento com cartão de crédito | |
O cliente pode optar pelo pagamento com cartão de crédito ao finalizar a compra. O pagamento via cartão de crédito | |
deve ser autorizado pela operadora. No caso do pagamento por um cartão de crédito ser negado pela operadora, o cliente | |
deve ter a opção de selecionar outro cartão de crédito. | |
Contexto: | |
Dado que selecionei o produto "Nike Air Vapor Ace" |
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
# Ensure you have brew cask installed http://caskroom.io | |
brew install caskroom/cask/brew-cask | |
# Install Docker Toolbox (this will install docker machine and virtualbox) | |
brew cask install dockertoolbox | |
# Create a linux machine for docker container to run on | |
docker-machine create --driver virtualbox default | |
# Add ENV variables for the machine to your profile (and restart your terminal) |
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
// Package GinHTMLRender provides some sugar for gin's template rendering | |
// | |
// This work is based on gin contribs multitemplate render https://github.com/gin-gonic/contrib/blob/master/renders/multitemplate | |
// | |
// Usage | |
// | |
// router := gin.Default() | |
// | |
// // Set html render options | |
// htmlRender := GinHTMLRender.New() |
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
var app = require('app'); // Module to control application life. | |
var BrowserWindow = require('browser-window'); // Module to create native browser window. | |
var loki = require('lokijs'), | |
db = new loki(), | |
users = db.addCollection('users', { | |
indices: ['username'] | |
}); | |
users.insert({ username: 'joe', age: 40}); | |
users.insert({ username: 'jack', age: 30}); |
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
package main | |
// mentioned in bleve google group | |
// https://groups.google.com/forum/#!topic/bleve/-5Q6W3oBizY | |
import ( | |
"encoding/json" | |
"fmt" | |
"github.com/blevesearch/bleve" | |
"github.com/blevesearch/bleve/document" |