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
# 1. Configuration | |
require 'balanced' | |
Balanced.configure('OUR_API_KEY_SECRET_HERE') | |
# 2. Our first request: creating customer | |
customer = Balanced::Customer.new(meta: { user_id: rand }, | |
name: 'Juquinha', | |
email: 'juquinha@example.com') | |
customer.save | |
user_uri = customer.uri |
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
cd ~/Downloads | |
curl -L https://www.atom.io/api/updates/download -A "Atom/0.1 CFNetwork/1.5" > Atom.zip | |
unzip Atom.zip | |
mv Atom.app /Applications | |
rm Atom.zip |
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
:map <F5> <ESC>:w<CR>:!gfortran %:p && ./a.out;<CR> |
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
> ProjectTotal.first.attributes | |
ProjectTotal Load (1.8ms) SELECT "project_totals".* FROM "project_totals" LIMIT 1 | |
=> {"project_id"=>13, "pledged"=>#<BigDecimal:7fe90f8b3558,'0.18E3',9(18)>, "progress"=>#<BigDecimal:7fe90f8b34e0,'0.2465753424 65753425E0',18(36)>, "total_payment_service_fee"=>#<BigDecimal:7fe90f8b3490,'0.0',9(18)>, "total_contributions"=>4, nil=>nil} |
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
#!/bin/bash | |
# store the current dir | |
CUR_DIR=$(pwd) | |
# Let the person running the script know what's going on. | |
echo "\n\033[1mPulling in latest changes for all repositories...\033[0m\n" | |
# Find all git repositories and update it to the master latest revision | |
for i in $(find . -name ".git" | cut -c 3-); do |
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 ad41bc44ebc302b70268bfe4323e4cc338290eaa Mon Sep 17 00:00:00 2001 | |
From: Irio Irineu Musskopf Junior <iirineu@gmail.com> | |
Date: Fri, 9 May 2014 20:58:24 -0300 | |
Subject: [PATCH] Use string keys to filter flash messages | |
I am not sure what has changed in ActionDispatch::Flash::FlashHash, but | |
reading its source code, it's pretty obvious that flash keys are internally | |
stored as strings. | |
--- | |
app/helpers/flash_messages_helper.rb | 2 +- |
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
Vagrant.configure('2') do |config| | |
config.vm.box = 'neighborly' | |
config.vm.box_url = 'http://cloud-images.ubuntu.com/vagrant/trusty/current/trusty-server-cloudimg-amd64-vagrant-disk1.box' | |
config.vm.provision :ventriloquist do |env| | |
env.packages << %w(imagemagick postgresql-contrib) | |
env.platforms << %w(ruby) | |
env.services << %w(postgres-9.3 redis-2.8) | |
end | |
end |
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
sumArgs :: Integer -> Integer -> Integer | |
sumArgs x y = x + y | |
times10 :: Integer -> Integer | |
times10 x = x * 10 | |
-- times10 . sumArgs 1 2 will become | |
-- > let composed = \x -> times10 (sumArgs x) | |
-- > composed 1 2 | |
-- error! |
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
params.compact.keep(*FILTER).each do |name| | |
#send | |
end |
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
# Save this file in the same folder as both | |
# Neighborly and gem repositories are. | |
# | |
# $ ./real_dummy_app.sh neighborly-balanced-bankaccount | |
GEM_NAME=$1 | |
# luminopolis folder | |
git clone git@github.com:neighborly/`echo $GEM_NAME`.git | |
cd neighborly | |
bundle exec rake db:drop |
OlderNewer