Skip to content

Instantly share code, notes, and snippets.

staltz /
Last active Dec 7, 2021
The introduction to Reactive Programming you've been missing
rahit /
Last active Dec 7, 2021
Canny, Prewitt and Sobel Edge detection using opencv
""" Canny, Prewitt and Sobel Edge detection using opencv
__author__ = "K.M. Tahsin Hassan Rahit"
__email__ = ""
import cv2
import numpy as np
img = cv2.imread('messi5.jpg')
View gist:6670468
ACTION = build
ALTERNATE_MODE = u+w,go-w,a+rX
ALTERNATE_OWNER = grantdavis
yossorion /
Last active Dec 6, 2021
What I Wish I'd Known About Equity Before Joining A Unicorn

What I Wish I'd Known About Equity Before Joining A Unicorn

Disclaimer: This piece is written anonymously. The names of a few particular companies are mentioned, but as common examples only.

This is a short write-up on things that I wish I'd known and considered before joining a private company (aka startup, aka unicorn in some cases). I'm not trying to make the case that you should never join a private company, but the power imbalance between founder and employee is extreme, and that potential candidates would

View exportjson.js
// Includes functions for exporting active sheet or all sheets as JSON object (also Python object syntax compatible).
// Tweak the makePrettyJSON_ function to customize what kind of JSON to export.
var FORMAT_ONELINE = 'One-line';
var FORMAT_MULTILINE = 'Multi-line';
var FORMAT_PRETTY = 'Pretty';
var LANGUAGE_JS = 'JavaScript';
var LANGUAGE_PYTHON = 'Python';
tedmiston / nodejs-tcp-example.js
Last active Dec 3, 2021
Node.js TCP client and server example
View nodejs-tcp-example.js
In the node.js intro tutorial (, they show a basic tcp
server, but for some reason omit a client connecting to it. I added an
example at the bottom.
Save the following server in example.js:
var net = require('net');
Brainiarc7 /
Last active Dec 2, 2021
This bash script will compile a static Ffmpeg build with NVENC and VAAPI hardware-accelerated support on Ubuntu in your home directory. You can modify the script to customize the build options as you see fit.
#This script will compile and install a static ffmpeg build with support for nvenc un ubuntu.
#See the prefix path and compile options if edits are needed to suit your needs.
#install required things from apt
echo "Installing prerequisites"
sudo apt-get update
sudo apt-get -y --force-yes install autoconf automake build-essential libass-dev libfreetype6-dev libgpac-dev \
Brainiarc7 /
Last active Nov 27, 2021
FFMpeg's playbook: Advanced encoding options with hardware-accelerated acceleration for both NVIDIA NVENC's and Intel's VAAPI-based hardware encoders in both ffmpeg and libav.

FFmpeg and libav's playbook: Advanced encoding options with hardware-based acceleration, NVIDIA's NVENC and Intel's VAAPI-based encoder.

Hello guys,

Continuing from this guide to building ffmpeg and libav with NVENC and VAAPI enabled, this snippet will cover advanced options that you can use with ffmpeg and libav on both NVENC and VAAPI hardware-based encoders.

For ffmpeg:

kkirsche / Install Composer to use MAMP's
Last active Nov 22, 2021
How to install Composer globally using MAMP's PHP
View Install Composer to use MAMP's

##Create an alias to MAMP's PHP installation

To do this, we can simply create an alias for our bash profile. We'll be doing this is nano, though you can do it in vim or a number of other editors as well.

Within the terminal, run:

nano ~/.bash_profile

This will open nano with the contents, at the top in a blank line add the following line: