Skip to content

Instantly share code, notes, and snippets.

Avatar
🧣

Avi Press aviaviavi

🧣
View GitHub Profile
View git-stashout
#!/bin/bash
function git_auto_stash_with_name() {
git stash save "autostash_$1"
}
function git_autostash_apply() {
stash_index="$(git stash list | grep "autostash_$1" | cut -d: -f1)"
if [ -n "$stash_index" ]; then
git stash pop
View scarf-install.sh
#!/bin/sh
PLATFORM=""
if [[ "$OSTYPE" == "linux-gnu" ]]; then
echo "Installing scarf on linux"
PLATFORM="linux"
elif [[ "$OSTYPE" == "darwin"* ]]; then
echo "Installing scarf on mac"
PLATFORM="mac"
View scarf.dhall
{ linux_x86_64 = < Linux_x86_64 = {=} | MacOS : {} >
, mac = < MacOS = {=} | Linux_x86_64 : {} >
}
View platforms.dhall
{ linux_i386 = < Linux_i386 = {=} | Linux_x86_64 : {} | MacOS : {} >
, linux_x86_64 = < Linux_x86_64 = {=} | Linux_i386 : {} | MacOS : {} >
, mac = < MacOS = {=} | Linux_i386 : {} | Linux_x86_64 : {} >
}
@aviaviavi
aviaviavi / ddp-node-example-payment-identify.js
Last active Nov 1, 2017
Getting started with the DotDashPay Node SDK (payment and identification)
View ddp-node-example-payment-identify.js
var util = require("util")
var ddp = require("dotdashpay")
ddp.platform.initialize({
// We are now using real payment hardware (e.g. a Kiosk III)
environment: "PROCESSOR_SIMULATOR"
}).onInitialized(data => {
console.log("initialized")
processPayment(500)
}).onInitializeError(err => {
@aviaviavi
aviaviavi / ddp-node-example-payment.js
Last active Nov 1, 2017
Getting started with the DotDashPay Node SDK (payment only)
View ddp-node-example-payment.js
var util = require("util")
var ddp = require("dotdashpay")
ddp.platform.initialize({
// `environment` allows you to specify aspects of the payment pipeline you
// may want to mock out. “PROCESSOR_SIMULATOR” implies that calls to the
// payment processor will be mocked, but the rest of the interactions with
// the DotDashPay platform on your system work as they normally would. To
// mock out payment peripherals (eg. to simulate a card swipe) you can use
// the “PERIPHERAL_SIMULATOR” environment. If you want to mock out the
View keybase.md

Keybase proof

I hereby claim:

  • I am aviaviavi on github.
  • I am aviaviavi (https://keybase.io/aviaviavi) on keybase.
  • I have a public key ASBLHZq4SiM7cc6EM4_iJQbvgAmMQqw5Pc2jnXXnJHiAgAo

To claim this, I am signing this object: