Skip to content

Instantly share code, notes, and snippets.

View justincorrigible's full-sized avatar
🐺
Nose to the wind!

Anders Richardsson justincorrigible

🐺
Nose to the wind!
View GitHub Profile
@justincorrigible
justincorrigible / gist:fa787dbb2d4a5c2b571db56fc6a45d88
Created December 9, 2020 19:58 — forked from kingbin/gist:9435292
Manually Start/Stop PostgresSQL on Mac
# Stop PostgreSQL from auto starting
sudo launchctl unload -w /Library/LaunchDaemons/com.edb.launchd.postgresql-9.3.plist
# Enable PostgreSQL to auto start
sudo launchctl load -w /Library/LaunchDaemons/com.edb.launchd.postgresql-9.3.plist
# Start postgres
$ sudo su postgres
Password:
bash-3.2$ pg_ctl -D /Library/PostgreSQL/9.3/data/ start
@justincorrigible
justincorrigible / WebpackHelper.cs
Created June 29, 2017 15:51 — forked from scottaddie/WebpackHelper.cs
C# helper method to parse webpack.assets.json
public static JObject GetWebpackAssetsJson(string applicationBasePath)
{
JObject webpackAssetsJson = null;
string packageJsonFilePath = $"{applicationBasePath}\\{"package.json"}";
using (StreamReader packageJsonFile = File.OpenText(packageJsonFilePath))
{
using (JsonTextReader packageJsonReader = new JsonTextReader(packageJsonFile))
{
JObject packageJson = (JObject)JToken.ReadFrom(packageJsonReader);
@justincorrigible
justincorrigible / curry.js
Created February 11, 2017 21:05 — forked from amatiasq/curry.js
Simple way to recursively curry javascript functions http://jsfiddle.net/amatiasq/osrsomq0/
/**
* @param {Function} fn Function to curry.
* @param {Number} lenght The arguments required to invoke the function. Optional. By default is fn.length
* @returns {Function} The currified function.
*/
function curry(fn, length) {
length = length || fn.length;
return function currified() {
var args = [].slice.call(arguments);