Skip to content

Instantly share code, notes, and snippets.

View cicorias's full-sized avatar

Shawn Cicoria cicorias

View GitHub Profile
@cicorias
cicorias / pr.md
Created March 12, 2016 15:40 — forked from piscisaureus/pr.md
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = [email protected]:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

@cicorias
cicorias / gist:9ad133060b13149d7d1b
Last active March 17, 2016 15:38 — forked from burakerdem/gist:d8195e6e343aa55ff578
Installing wget on Mac OS X El Capitan 10.11
ln -s /usr/local/opt/openssl /usr/local/ssl
curl -O http://ftp.gnu.org/gnu/wget/wget-1.17.tar.gz
tar -xzf wget-1.17.tar.gz
cd wget-1.17
./configure --with-ssl=openssl
./configure --with-ssl=openssl --with-libssl-prefix=/usr/local/ssl
make
sudo make install
wget --help
cd .. && rm -rf wget*
>>>>>> OS Version
SystemDirectory : C:\WINDOWS\system32
Organization :
BuildNumber : 10586
RegisteredUser : [email protected]
SerialNumber : 00330-62834-39220-AAOEM
Version : 10.0.10586
#install docker-compose
sudo su -
#coreos - us this
export DT=/opt/bin
#ubuntu use
export DT=/usr/bin
mkdir -p $DT
export DV=1.6.2
@cicorias
cicorias / ngrok-selfhosting-setup.md
Created April 24, 2016 03:27 — forked from lyoshenka/ngrok-selfhosting-setup.md
How to setup Ngrok with a self-signed SSL cert

Intro

The plan is to create a pair of executables (ngrok and ngrokd) that are connected with a self-signed SSL cert. Since the client and server executables are paired, you won't be able to use any other ngrok to connect to this ngrokd, and vice versa.

DNS

Add two DNS records: one for the base domain and one for the wildcard domain. For example, if your base domain is domain.com, you'll need a record for that and for *.domain.com.

Different Operating Systems

@cicorias
cicorias / Generators.fsx
Created April 26, 2016 00:55 — forked from shwars/Generators.fsx
Demonstration of creating generators in F#
// Simple counter
type cell = { mutable content : int }
let new_counter n =
let x :cell = { content = n }
fun () ->
(x.content <- x.content+1; x.content)
// The same, using F# refs
let new_counter' n =
@cicorias
cicorias / appify.sh
Created May 12, 2016 19:43
turns a folder into an app on OS X
#!/bin/bash
if [ "$1" = "-h" -o "$1" = "--help" -o -z "$1" ]; then cat <<EOF
appify v3.0.1 for Mac OS X - http://mths.be/appify
Creates the simplest possible Mac app from a shell script.
Appify takes a shell script as its first argument:
`basename "$0"` my-script.sh
Note that you cannot rename appified apps. If you want to give your app
a custom name, use the second argument:
`basename "$0"` my-script.sh "My App"
@cicorias
cicorias / sample.js
Created July 6, 2016 21:28 — forked from chrisabrams/sample.js
Bluebird promise chain example
Promise = require('bluebird')
var A = function() {
return new Promise(function(resolve, reject) {
var result = 'A is done'
console.log(result)
resolve(result);
})
@cicorias
cicorias / Dockerfile
Last active April 5, 2024 08:40
Simple HTTP server in Docker
###
FROM mhart/alpine-node
RUN npm install -g http-server
WORKDIR /site
ADD ./ /site
# The default port of the application