Skip to content

Instantly share code, notes, and snippets.

Avatar
:octocat:
Slingin' Code

Dan Stroot dstroot

:octocat:
Slingin' Code
View GitHub Profile
View osx-10.10-setup.md

Mac OS X 10.10 Yosemite

Custom recipe to get OS X 10.10 Yosemite running from scratch, setup applications and developer environment. I use this gist to keep track of the important software and steps required to have a functioning system after a semi-annual fresh install. On average, I reinstall each computer from scratch every 6 months, and I do not perform upgrades between distros.

This keeps the system performing at top speeds, clean of trojans, spyware, and ensures that I maintain good organizational practices for my content and backups. I highly recommend this.

You are encouraged to fork this and modify it to your heart's content to match your own needs.

Install Software

@dstroot
dstroot / app.js
Created Jul 13, 2014
Gulp, BrowserSync, Node, and Nodemon all working in harmony. ;)
View app.js
/**
* World's simplest express server
* - used to serve index.html from /public
*/
var express = require('express');
var serveStatic = require('serve-static');
var app = express();
app.use(serveStatic(__dirname + '/public'));
@dstroot
dstroot / .jscsrc
Last active Aug 29, 2015
issue with gulp-jscs
View .jscsrc
{
"disallowTrailingComma": true,
"requireSpaceAfterLineComment": true,
"requireSpacesInConditionalExpression": true
}
@dstroot
dstroot / gist:48adce48ab2857ae9c0a
Created Jun 22, 2014
conservatory Error (403): Forbidden
View gist:48adce48ab2857ae9c0a
❯ jitsu deploy
info: Welcome to Nodejitsu dstroot
info: jitsu v0.13.16, node v0.10.28
info: It worked if it ends with Nodejitsu ok
info: Executing command deploy
info: Analyzing application dependencies in node app.js
warn: Local package version appears to be old
warn: The package.json version will be incremented automatically
warn: About to write /Users/Dan/Code/skeleton/package.json
data:
View www-redirect.js
// This is for SEO: We *only* want to serve from
// either www.domain.com or just domain.com but *not* both.
// So we need to choose and then do a 301 redirect to get
// traffic where we want it.
//
// NOTE: Don't hardcode the http:// or https:// in the redirect
// URI; this makes life suck when switching between dev and prod
// environments - use req.protocol instead as we do below.
//
// Also note that in order to use req.protocol reliably behind a
@dstroot
dstroot / nginx_config_1.txt
Last active Aug 29, 2015
Configuration for nginx in front of node
View nginx_config_1.txt
# Example 1
# -------------------------------------------------
# nginx config file for nodejs
#
# you can put nginx in front of node for two good reasons:
# 1) To take some of the load off nodejs for serving
# anything static.
# 2) To run multiple nodjs sites on one server
# domain1:80 -|->nginx-|-> nodejs:3000
# domain2:80 -| |-> nodejs:4000
@dstroot
dstroot / setup_nginx.sh
Last active Aug 29, 2015
Setup NGINX on Ubuntu
View setup_nginx.sh
#!/bin/bash
###############################################
# To use:
# wget https://raw.github.com/gist/4411254
# chmod 777 setup_nginx.sh
# ./setup_nginx.sh
###############################################
echo "*****************************************"
echo " Step 1: Install nngix"
echo "*****************************************"
@dstroot
dstroot / github-ubuntu.sh
Last active Sep 20, 2022
Setting up github on Ubuntu
View github-ubuntu.sh
#!/bin/bash
###############################################
# To use:
# wget https://raw.github.com/gist/4411254
# chmod 777 github-ubuntu.sh
# ./github-ubuntu.sh
###############################################
echo "*****************************************"
echo " Step 1: Check your keys"
echo "*****************************************"
@dstroot
dstroot / raspberry_sendmail.sh
Created Nov 18, 2012
Setup email routing (Sendmail) on Asterisk Raspberry Pi
View raspberry_sendmail.sh
# Set "Smart" Relay Host
sudo sed -i.bak -e 's/DS$/DSsmtp.west.cox.net/' /etc/mail/sendmail.cf
# Restart Sendmail
/etc/init.d/sendmail restart
@dstroot
dstroot / install_postgresql.sh
Created Jun 13, 2012
Install PostgreSQL on Amazon AMI
View install_postgresql.sh
#!/bin/bash
###############################################
# To use:
# https://raw.github.com/gist/2776351/???
# chmod 777 install_postgresql.sh
# ./install_postgresql.sh
###############################################
echo "*****************************************"
echo " Installing PostgreSQL"
echo "*****************************************"