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
command = ARGV.shift | |
args = ARGV | |
puts "arguments: #{command}, args: #{args}" | |
raise "Unknow command" unless ['co', 'pop'].include?(command) | |
file_path = '/tmp/.bstack' | |
module BStack | |
class PopCmd | |
attr_reader :file |
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
{ | |
:BEGIN=>1, | |
:END=>1, | |
:alias=>2, | |
:alias_error=>1, | |
:aref=>2, | |
:aref_field=>2, | |
:arg_ambiguous=>0, | |
:arg_paren=>1, | |
:args_add=>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
{ | |
:CHAR=>1, | |
:__end__=>1, | |
:backref=>1, | |
:backtick=>1, | |
:comma=>1, | |
:comment=>1, | |
:const=>1, | |
:cvar=>1, | |
:embdoc=>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
window.onload = function() { | |
var $rootElement = angular.element(window.document); | |
var modules = ['ng', 'myApp', function($provide) { | |
$provide.value('$rootElement', $rootElement); | |
}]; | |
var $injector = angular.injector(modules); | |
var $compile = $injector.get('$compile'); | |
var compositeLinkFn = $compile($rootElement); |
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
angular.module("ui.bootstrap", ["ui.bootstrap.accordion","ui.bootstrap.dropdownToggle","ui.bootstrap.modal","ui.bootstrap.tabs"]); | |
angular.module('ui.bootstrap.accordion', []); | |
angular.module('ui.bootstrap.accordion').controller('AccordionController', ['$scope', function ($scope) { | |
var groups = $scope.groups = []; | |
this.select = function(group) { | |
angular.forEach(groups, function (group) { | |
group.selected = false; |
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
<?xml version="1.0"?> | |
<root> | |
<item> | |
<name>Change Page Down to Control Right</name> | |
<identifier>private.swap_space_and_tab</identifier> | |
<autogen>--KeyToKey-- KeyCode::PAGEDOWN, KeyCode::CONTROL_R</autogen> | |
</item> | |
</root> |
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
source 'https://rubygems.org' | |
gem 'rails', '3.2.1' | |
# Bundle edge Rails instead: | |
# gem 'rails', :git => 'git://github.com/rails/rails.git' | |
gem 'sqlite3' | |
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
require "rubygems" | |
require "net/http" | |
@base_url = "https://www.bitcoinpayflow.com" | |
@access_token = "yourtoken" | |
# create an order: | |
uri = URI.parse("#{@base_url}/orders") | |
http = Net::HTTP.new(uri.host, uri.port) |
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
POST /tokens | |
Request | |
{ | |
"auth_token" : "Your primary access token" | |
"token" : { "bitcoin_address" : "Bitcoin address associated with this token" } | |
} | |
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
Post http://yourwebsite.com/payment_notification | |
Parameters | |
{ | |
"Payment Notification" : | |
{ | |
"foreign_order_id" : "A1234", | |
"amount" : "2.20", | |
"transaction_fee" : 0.0, | |
"bitcoin_address" : "1AFZ6Cv8q96rFaS9T8fR1y2j2CjNDcTIVD", |