Skip to content

Instantly share code, notes, and snippets.

View elgs's full-sized avatar
🌵

Qian Chen elgs

🌵
View GitHub Profile
@ibraheem4
ibraheem4 / postgres-brew.md
Last active October 14, 2024 11:59 — forked from sgnl/postgres-brew.md
Installing Postgres via Brew (OSX)

Installing Postgres via Brew

Pre-Reqs

Brew Package Manager

In your command-line run the following commands:

  1. brew doctor
  2. brew update

Git Cheat Sheet

Commands

Getting Started

git init

or

@adamwalz
adamwalz / vpn_shared_secret_decoder.py
Created November 20, 2014 22:50
VPN Shared Secret decoder for networkConnect files
#!/usr/bin/python
# Decoder for the ExportedSharedSecret values stored in .networkConnect files
# Tested with .networkConnect files created in Mac OS X 10.10
#
# Author: Martin Rakhmanov, http://jimmers.info
#
# Example invocation and output:
#
# python vpn_shared_secret_decoder.py TLthF+e88vwmAYhK
@elgs
elgs / Nodejs_Cluster.md
Last active August 29, 2015 13:56
Nodejs cluster
var cluster = require('cluster');
var http = require('http');
var numWorkers = 2;

if (cluster.isMaster) {
    // Fork worker.
    for (var i = 0; i < numWorkers; ++i) {
        console.log('master: about to fork a worker');
        cluster.fork();
@bemasher
bemasher / stack.go
Last active August 19, 2020 10:59
A simple LIFO stack backed by a linked list implemented with golang.
package main
import (
"fmt"
)
type Stack struct {
top *Element
size int
}