Skip to content

Instantly share code, notes, and snippets.

Avatar

Andrew Shankie shankie-codes

View GitHub Profile
View Artist Advance API spec
{
"swagger": "2.0",
"info": {
"version": "0.0.1",
"title": "Artist Advance API"
},
"securityDefinitions": {
"auth0": {
"type": "oauth2",
"flow": "implicit",
View gist:7474f18a3005a75faefe9d7519688501
apt-get remove -y docker docker-engine
apt-get update
apt-get install -y \
linux-image-extra-$(uname -r) \
linux-image-extra-virtual
apt-get install -y \
apt-transport-https \
ca-certificates \
curl \
software-properties-common
@shankie-codes
shankie-codes / mongoose-schema.sublime-snippet
Created Jan 10, 2017
A Sublime Text snippet for creating Mongoose.js models
View mongoose-schema.sublime-snippet
<snippet>
<content><![CDATA[
import mongoose from 'mongoose';
const Schema = mongoose.Schema;
const ${1:${TM_FILENAME/(.+)\..+|.*/$1/:SchemaName}}Schema = new Schema({
name: { type: 'String', required: true }
});
export default mongoose.model('${1:SchemaName}', ${1:SchemaName}Schema);
@shankie-codes
shankie-codes / do-wordpress-ssl
Created Apr 1, 2016
create new docker machine with https-portal network
View do-wordpress-ssl
#!/bin/bash
echo "Enter the hostname that you'd like to create:"
read HOSTNAME
# Can be defined as an environment variable
if [ -z "$DO_TOKEN" ]; then
echo "Enter your Digital Ocean access token:"
read DO_TOKEN
fi
@shankie-codes
shankie-codes / gist:04a0f19cc5346928c95e7686f8df1913
Created Apr 1, 2016
Create a new site on a https-portal network
View gist:04a0f19cc5346928c95e7686f8df1913
echo "Enter site name, e.g. 'hello' if you want to create 'hello.staging.properdesign.rs'" && \
read SITE && \
docker run -d -P \
--link properstaging_db_1:mysql \
--restart=always \
-e "VIRTUAL_HOST=$SITE.staging.properdesign.rs" \
-e "WORDPRESS_DB_NAME=$SITE" \
-e "PRODUCTION=true" \
-v /www/$SITE/uploads:/var/www/html/wp-content/uploads \
-v /www/$SITE/plugins:/var/www/html/wp-content/plugins \
@shankie-codes
shankie-codes / do-wordpress.sh
Last active Apr 1, 2016
Create WordPress nginx droplet on digital ocean using Docker
View do-wordpress.sh
#!/bin/bash
echo "Enter the hostname that you'd like to create:"
read HOSTNAME
# Can be defined as an environment variable
if [ -z "$DO_TOKEN" ]; then
echo "Enter your Digital Ocean access token:"
read DO_TOKEN
fi
@shankie-codes
shankie-codes / docker-machine-create-wordpress-nginx-digitalocean-droplet
Last active May 25, 2016
docker-machine-create-wordpress-nginx-digitalocean-droplet
View docker-machine-create-wordpress-nginx-digitalocean-droplet
#!/bin/bash
echo "Enter the hostname that you'd like to create:"
read HOSTNAME
if [ -z "$DO_TOKEN" ]; then
echo "Enter your Digital Ocean access token:"
read DO_TOKEN
fi
if [ -z "$PUBLIC_KEYS" ]; then
echo "Enter your public keys followed by Ctrl-D:"
@shankie-codes
shankie-codes / twitter-oauth.js
Last active Mar 31, 2016 — forked from santosh79/twitter-oauth.js
Twitter OAuth with node-oauth for node.js+express
View twitter-oauth.js
var express = require('express');
var sys = require('util');
var oauth = require('oauth');
var app = express.createServer();
var _twitterConsumerKey = process.env['TWITTER_CONSUMER_KEY'];
var _twitterConsumerSecret = process.env['TWITTER_CONSUMER_SECRET'];
console.log("_twitterConsumerKey: %s and _twitterConsumerSecret %s", _twitterConsumerKey, _twitterConsumerSecret);
View gist:20bbe5c2e2c1efabc3e4
rsync -vzre ssh --delete $sourcedir $destdir
@shankie-codes
shankie-codes / gist:5176630e61ee0b98ba43
Last active Oct 6, 2015
rsub: add helper script to server
View gist:5176630e61ee0b98ba43
wget -O /usr/local/bin/rsub https://raw.github.com/aurora/rmate/master/rmate; chmod +x /usr/local/bin/rsub
You can’t perform that action at this time.