Skip to content

Instantly share code, notes, and snippets.

View kprinssu's full-sized avatar

Kishor Prins kprinssu

  • Vancouver, British Columbia
View GitHub Profile
@kousu
kousu / README
Last active May 13, 2016 10:40
Cs350 OS161 Install scripts
If you're on Archlinux you shouuuuld just be able to drop these two files in a dir by themselves, chmod +x them, and run "install.sh".
If you're on a different Unix you can probably adapt this without too much effort to your system, especially the part about .
If you're not in Winter 2015 you probably need to tweak update.sh.
Sorry for the poor documentation and poor testing! And also the almost complete lack of error handling!
Hopefully this helps someone else in the future! this represents 13 hours of my life!
Tip: make your empty dir a git repo so that then you can just do
```
git clean -df && git clean -xfd
@danguita
danguita / docker-machine-ssh-tunneling.md
Last active June 26, 2020 16:43
Docker Machine SSH tunneling

As described on the Docker Machine SSH reference, the docker-machine CLI invokes the standard OpenSSH client so we can use the common SSH tunneling syntax here. The following command will forward port 3000 from the default machine to localhost on your host computer's loopback interface. Using 0.0.0.0 as bind_address will make it bind to all interfaces:

$ docker-machine ssh default -L 0.0.0.0:3000:localhost:3000

So, the container running at machine's port 3000 can be reached through localhost:3000 or any of your interfaces' IP (i.e. 192.168.1.10:3000). That'd be useful to access your containerized services from other devices in your LAN.

@danguita

@fntlnz
fntlnz / self-signed-certificate-with-custom-ca.md
Last active July 15, 2024 09:31
Self Signed Certificate with Custom Root CA

Create Root CA (Done once)

Create Root Key

Attention: this is the key used to sign the certificate requests, anyone holding this can sign certificates on your behalf. So keep it in a safe place!

openssl genrsa -des3 -out rootCA.key 4096
@grudko
grudko / gist:4c1dcd2a2eb29bc3d98cd19bfd916cbd
Created December 2, 2016 13:16
Asyncio aiohttp example with PonyORM
#!/usr/bin/env python3
import asyncio
from asyncio_extras import threadpool
from aiohttp import web
from pony.orm import *
db = Database()
@nchase
nchase / webpack.config.js
Created January 23, 2017 15:44
Webpack EnvironmentPlugin
// Webpack's poorly-documented EnvironmentPlugin
//
// Read more here: https://github.com/webpack/webpack/blob/master/lib/EnvironmentPlugin.js
var webpack = require('webpack');
module.exports = {
plugins: [
new webpack.EnvironmentPlugin([
'NODE_ENV'
@ibraheem4
ibraheem4 / postgres-brew.md
Last active July 5, 2024 17:29 — 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
pm uninstall -k --user 0 com.google.android.apps.tachyon &&
pm uninstall -k --user 0 com.google.android.music &&
pm uninstall -k --user 0 com.google.android.apps.docs.editors.sheets &&
pm uninstall -k --user 0 com.google.android.apps.docs.editors.slides &&
pm uninstall -k --user 0 com.google.android.apps.docs.editors.docs &&
pm uninstall -k --user 0 com.google.android.videos &&
pm uninstall -k --user 0 com.android.gallery3d &&
pm uninstall -k --user 0 com.android.calendar &&
pm uninstall -k --user 0 com.evernote &&
pm uninstall -k --user 0 com.evernote.promohelper &&
@lirenyeo
lirenyeo / bs4-cheatsheet.md
Last active May 30, 2022 01:40
Bootstrap 4 Utilities Cheatsheet

Bootstrap 4 Utilities Cheatsheet

Media Queries

1. up

Bootstrap 4 Mixins Compiled into
@include media-breakpoint-up(xs) @media (min-width: 0px)
@include media-breakpoint-up(sm) @media (min-width: 576px)
@include media-breakpoint-up(md) @media (min-width: 768px)
@robhrt7
robhrt7 / MySQL_5-7_macOS.md
Last active February 28, 2024 03:48 — forked from nrollr/MySQL_macOS_Sierra.md
Install MySQL 5.7 on macOS using Homebrew

This is a fork of original gist https://gist.github.com/nrollr/3f57fc15ded7dddddcc4e82fe137b58e, with slight changes on pointing to 5.7 version branch, instead of 8 (latest default of MySQL in Hombrew).

Install MySQL 5.7 on macOS

This procedure explains how to install MySQL using Homebrew on macOS (Sierra 10.12 and up)

Install Homebrew

  • Installing Homebrew is effortless, open Terminal and enter :
    $ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  • Note: Homebrew will download and install Command Line Tools for Xcode 8.0 as part of the installation process.