Skip to content

Instantly share code, notes, and snippets.

🔧
Building, breaking, and fixing things.

Nick Parsons nparsons08

🔧
Building, breaking, and fixing things.
View GitHub Profile
@nparsons08
nparsons08 / Bcrypt.php
Created Aug 7, 2012 — forked from marcoarment/Bcrypt.php
Simple PHP 5.3+ Bcrypt class and functions
View Bcrypt.php
<?php
/*
By Marco Arment <me@marco.org>.
This code is released in the public domain.
THERE IS ABSOLUTELY NO WARRANTY.
Usage example:
// In a registration or password-change form:
View godaddy-heroku-ssl.md

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
View Magento-1.7.2: Delete all orders and dashboard.sql
-- 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`;
View 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",
View 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",
View 1-restify-server-cheatsheet.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');
@nparsons08
nparsons08 / api.js
Created Nov 27, 2015 — forked from fwielstra/api.js
An example NodeJS / Mongoose / Express application based on their respective tutorials
View api.js
/* 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');
@nparsons08
nparsons08 / nginx-ssl-config
Created May 13, 2016 — forked from apollolm/nginx-ssl-config
Nginx Configuration with multiple port apps on same domain, with SSL.
View nginx-ssl-config
# 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;
}
@nparsons08
nparsons08 / android_instructions.md
Created May 18, 2016 — forked from patrickhammond/android_instructions.md
Easily setup an Android development environment on a Mac
View android_instructions.md

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)"
@nparsons08
nparsons08 / hapijs-rest-api-tutorial.md
Created Oct 16, 2016 — 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
View hapijs-rest-api-tutorial.md
You can’t perform that action at this time.