I hereby claim:
- I am puppycodes on github.
- I am puppycodes (https://keybase.io/puppycodes) on keybase.
- I have a public key ASA8m5HNTpKwshMV619DPO_C1larZPJ5MrwmxZ842M4kXgo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
#!/bin/bash | |
export SHELL=$(type -P bash) | |
targetdir="/var/github" | |
user=GITHUBUSER | |
token=ACCESSTOKEN | |
urls="/users/$user/repos /users/$user/starred" | |
# actions | |
# all actions get the following parameter |
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing! | |
VAGRANTFILE_API_VERSION = "2" | |
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
config.vm.box = "hashicorp/precise64" | |
config.vm.provision :shell, path: "bootstrap.sh" |
_ | |
| | | |
_ __ _ _ _ __ _ __ _ _ ___ ___ __| | ___ ___ | |
| _ \| | | | _ \| _ \| | | |/ __/ _ \ / _ |/ _ \/ __| | |
| |_) | |_| | |_) | |_) | |_| | (_| (_) | (_| | __/\__ \ | |
| __/ \__ _| __/| __/ \__ |\___\___/ \__ _|\___||___/ | |
| | | | | | __/ | | |
|_| |_| |_| |___/ |
#!/bin/bash | |
echo "" | |
# Root check | |
if [[ "$UID" -ne 0 ]]; then | |
echo "!! This script requires root privileges. sudo ./create_koken.sh" | |
echo "" | |
exit | |
fi |
curl GET -H 'Content-Type: application/json' 'https://key:pass@shopname.myshopify.com/admin/orders.json' |
To fix for a manual gem install: | |
brew install openssl | |
gem install mysql2 -- --with-opt-dir="$(brew --prefix openssl)" | |
To fix for all bundle installs: | |
brew install openssl | |
bundle config --global build.mysql2 --with-opt-dir="$(brew --prefix openssl)" | |
bundle install |
exports = function(payload, response) { | |
const mongodb = context.services.get('<your-service-name>'); | |
const collection = mongodb.db("<your-db-name>").collection("<your-collection-name>"); | |
var json = EJSON.parse(payload.body.text()); | |
var user = json.userId; | |
var status = json.orderStatus; | |
return collection | |
.updateOne( |
exports = function(payload, response) { | |
// declare mongo services and db | |
const mongodb = context.services.get('<your-service-name>'); | |
const collection = mongodb.db('<your-db-name>').collection('<your-collection-name>'); | |
// json from webhook into insert function... | |
// convert body to EJSON for proper formatting | |
collection.insertOne({ | |
body: EJSON.parse(payload.body.text()), |
find: ([.|\w|-])*\.(?:jpg|gif|png|svg) | |
replace: {{'$&' | asset_url}} |