Skip to content

Instantly share code, notes, and snippets.

View astrotars's full-sized avatar
⛰️

Nick Parsons astrotars

⛰️
View GitHub Profile
@astrotars
astrotars / aggregated_feed.json
Created August 30, 2017 21:02 — forked from iandouglas/aggregated_feed.json
Stream Feed Output
{
"next": "",
"duration": "46ms",
"results": [{
"created_at": "2017-06-28T16:38:58.806970",
"updated_at": "2017-06-28T16:38:58.806970",
"activities": [{
"actor": "ian",
"foreign_id": "5",
"target": null,
@astrotars
astrotars / hapijs-rest-api-tutorial.md
Created October 16, 2016 21:37 — forked from agendor/hapijs-rest-api-tutorial.md
A practical introduction to building a RESTful API with the hapi.js server framework for Node.js
@astrotars
astrotars / android_instructions.md
Created May 18, 2016 04:59 — forked from patrickhammond/android_instructions.md
Easily setup an Android development environment on a Mac

Here is a high level overview for what you need to do to get most of an Android environment setup and maintained.

Prerequisites (for Homebrew at a minimum, lots of other tools need these too):

  • XCode is installed (via the App Store)
  • XCode command line tools are installed (xcode-select --install will prompt up a dialog)
  • Java

Install Homebrew:

ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"

@astrotars
astrotars / nginx-ssl-config
Created May 13, 2016 22:44 — forked from apollolm/nginx-ssl-config
Nginx Configuration with multiple port apps on same domain, with SSL.
# the IP(s) on which your node server is running. I chose port 3000.
upstream app_geoforce {
server 127.0.0.1:3000;
}
upstream app_pcodes{
server 127.0.0.1:3001;
}
@astrotars
astrotars / api.js
Created November 27, 2015 17:46 — forked from fwielstra/api.js
An example NodeJS / Mongoose / Express application based on their respective tutorials
/* The API controller
Exports 3 methods:
* post - Creates a new thread
* list - Returns a list of threads
* show - Displays a thread and its posts
*/
var Thread = require('../models/thread.js');
var Post = require('../models/post.js');
// Restify Server CheatSheet.
// More about the API: http://mcavage.me/node-restify/#server-api
// Install restify with npm install restify
// 1.1. Creating a Server.
// http://mcavage.me/node-restify/#Creating-a-Server
var restify = require('restify');
@astrotars
astrotars / haiku
Last active August 29, 2015 14:21 — forked from friggeri/haiku
haiku = ->
adjs = [
"autumn", "hidden", "bitter", "misty", "silent", "empty", "dry", "dark",
"summer", "icy", "delicate", "quiet", "white", "cool", "spring", "winter",
"patient", "twilight", "dawn", "crimson", "wispy", "weathered", "blue",
"billowing", "broken", "cold", "damp", "falling", "frosty", "green",
"long", "late", "lingering", "bold", "little", "morning", "muddy", "old",
"red", "rough", "still", "small", "sparkling", "throbbing", "shy",
"wandering", "withered", "wild", "black", "young", "holy", "solitary",
"fragrant", "aged", "snowy", "proud", "floral", "restless", "divine",
@astrotars
astrotars / haiku
Last active August 29, 2015 14:09 — forked from friggeri/haiku
haiku = ->
adjs = [
"autumn", "hidden", "bitter", "misty", "silent", "empty", "dry", "dark",
"summer", "icy", "delicate", "quiet", "white", "cool", "spring", "winter",
"patient", "twilight", "dawn", "crimson", "wispy", "weathered", "blue",
"billowing", "broken", "cold", "damp", "falling", "frosty", "green",
"long", "late", "lingering", "bold", "little", "morning", "muddy", "old",
"red", "rough", "still", "small", "sparkling", "throbbing", "shy",
"wandering", "withered", "wild", "black", "young", "holy", "solitary",
"fragrant", "aged", "snowy", "proud", "floral", "restless", "divine",
-- Tested on 1.7.2.
-- Run the below MySQL query in your phpmyadmin
-- It has deleted my all test orders and also reset my dashboard.
----------------------------------------------------------------------------------------------
SET FOREIGN_KEY_CHECKS=0;
TRUNCATE `catalogsearch_query`;

How to use Heroku's SSL Endpoint with an SSL certificate purchased from GoDaddy.

Create a Private Key

https://devcenter.heroku.com/articles/csr

openssl genrsa -des3 -out server.orig.key 2048
openssl rsa -in server.orig.key -out server.key