Skip to content

Instantly share code, notes, and snippets.

View astrotars's full-sized avatar
⛰️

Nick Parsons astrotars

⛰️
View GitHub Profile
@prologic
prologic / LearnGoIn5mins.md
Last active April 13, 2024 21:45
Learn Go in ~5mins
@iandouglas
iandouglas / aggregated_feed.json
Created June 28, 2017 16:41
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,
@oleksmarkh
oleksmarkh / api.js
Last active August 15, 2020 09:21
transport layer (abstraction over "axios")
import axios from 'axios';
import { mapKeys, mapValues, camelCase, snakeCase } from 'lodash';
const { API_URL } = process.env;
function getAccessToken() {
// @todo: load access token from cookie
return 'token';
}
@apollolm
apollolm / nginx-ssl-config
Last active January 12, 2023 14:47
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;
}
// 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');
@patrickhammond
patrickhammond / android_instructions.md
Last active March 29, 2024 20:14
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)"

@agendor
agendor / hapijs-rest-api-tutorial.md
Last active August 31, 2021 08:31
A practical introduction to building a RESTful API with the hapi.js server framework for Node.js
@astrotars
astrotars / .gitignore
Created December 4, 2012 18:33
Allows for empty directory in GIT repository.
# Ignore everything in this directory
*
# Except this file
!.gitignore
@friggeri
friggeri / haiku
Created October 6, 2011 07:30
random heroku-like name generator
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",
@fwielstra
fwielstra / api.js
Created June 14, 2011 14:46
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');