Skip to content

Instantly share code, notes, and snippets.

@ryanburnett
ryanburnett / Local SSL on macOS.md
Last active March 15, 2020 11:45 — forked from jonathantneal/README.md
Local SSL websites on macOS Sierra

Local SSL websites on macOS Sierra

These instructions will guide you through the process of setting up local, trusted websites on your own computer.

These instructions are intended to be used on macOS Sierra, but they have been known to work in El Capitan, Yosemite, Mavericks, and Mountain Lion.

NOTE: You may substitute the edit command for nano, vim, or whatever the editor of your choice is. Personally, I forward the edit command to Sublime Text:

alias edit="/Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl"
## generic files to ignore
*~
*.lock
*.DS_Store
*.swp
*.out
bin
# node + grunt specific
.sass-cache
0 info it worked if it ends with ok
1 verbose cli [ 'node', '/usr/local/bin/npm', 'start' ]
2 info using npm@1.4.15
3 info using node@v0.10.26
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info prestart angular-browserify@0.0.0
6 info start angular-browserify@0.0.0
7 verbose unsafe-perm in lifecycle true
8 info angular-browserify@0.0.0 Failed to exec start script
9 error angular-browserify@0.0.0 start: `browserify ./app/js/index.js > ./app/js/bundle.js; beefy ./js/index.js:js/bundle.js --liv --cwd ./app`
@ryanburnett
ryanburnett / gist:8d9f1a2fb3861b4099e7
Created June 13, 2014 14:17
npm update -g "Error: EMFILE, readdir"
0 info it worked if it ends with ok
1 verbose cli [ 'node', '/usr/local/bin/npm', 'update', '-g', 'npm' ]
2 info using npm@1.4.15
3 info using node@v0.10.26
4 verbose url raw npm
5 verbose url resolving [ 'https://registry.npmjs.org/', './npm' ]
6 verbose url resolved https://registry.npmjs.org/npm
7 info trying registry request attempt 1 at 10:11:12
8 verbose etag "AODNG5TA575201XSBSB90MI3"
9 http GET https://registry.npmjs.org/npm
var mongoose = require('mongoose');
mongoose.connect('mongodb://localhost/test');
var db = mongoose.connection;
db.on('error', console.error.bind(console, 'connection error:'));
db.once('open', function callback (){
var kittySchema = mongoose.Schema({
name: String
});
@ryanburnett
ryanburnett / gist:b4597367acefb58ae9ad
Created June 12, 2014 15:14
Mongoose Getting Started error
/Users/Ryan/Sites/mongoose-test/node_modules/mongoose/lib/index.js:333
throw new mongoose.Error.OverwriteModelError(name);
^
OverwriteModelError: Cannot overwrite `Kitten` model once compiled.
at Mongoose.model (/Users/Ryan/Sites/mongoose-test/node_modules/mongoose/lib/index.js:333:13)
at Promise.callback (/Users/Ryan/Sites/mongoose-test/server.js:19:25)
at Promise.<anonymous> (/Users/Ryan/Sites/mongoose-test/node_modules/mongoose/node_modules/mpromise/lib/promise.js:177:8)
at Promise.EventEmitter.emit (events.js:95:17)
at Promise.emit (/Users/Ryan/Sites/mongoose-test/node_modules/mongoose/node_modules/mpromise/lib/promise.js:84:38)
at Promise.fulfill (/Users/Ryan/Sites/mongoose-test/node_modules/mongoose/node_modules/mpromise/lib/promise.js:97:20)
@ryanburnett
ryanburnett / gist:18ee4e99d6c010beee5b
Created May 14, 2014 16:00
Warning: An unexpected error occurred
The update process is starting. This process may take a while on some hosts, so please be patient.
Updating Theme Twenty Eleven (1/1)
Twenty Eleven updated successfully. Show Details.
Warning: An unexpected error occurred. Something may be wrong with WordPress.org or this server’s configuration. If you continue to have problems, please try the support forums. (WordPress could not establish a secure connection to WordPress.org. Please contact your server administrator.) in C:\Domains\ryanburnett.com\wwwroot\wp-includes\update.php on line 287
Warning: An unexpected error occurred. Something may be wrong with WordPress.org or this server’s configuration. If you continue to have problems, please try the support forums. (WordPress could not establish a secure connection to WordPress.org. Please contact your server administrator.) in C:\Domains\ryanburnett.com\wwwroot\wp-includes\update.php on line 435
Warning: An unexpected error occurred. Something may be wrong with WordPress.org or this server’s configuratio
var express = require('express'),
stylus = require('stylus');
mongoose = require('mongoose');
var env = process.env.NODE_ENV = process.env.NODE_ENV || 'development';
var app = express();
function compile(str, path) {
return stylus(str).set('filename', path);
@ryanburnett
ryanburnett / gist:10389433
Created April 10, 2014 14:39
node server.js TypeError
/Users/Ryan/Sites/jumpstart/server.js:4
app.configure(function () {
^
TypeError: Object function (req, res, next) {
app.handle(req, res, next);
} has no method 'configure'
at Object.<anonymous> (/Users/Ryan/Sites/jumpstart/server.js:4:5)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
@ryanburnett
ryanburnett / SassMeister-input.scss
Created February 24, 2014 22:20
Generated by SassMeister.com.
// ----
// Sass (v3.3.0.rc.5)
// Compass (v1.0.0.alpha.18)
// ----
$color = #ccc;
body {
background-color: $color;
}