Skip to content

Instantly share code, notes, and snippets.

@kflu
kflu / RateThrottleProgress.cs
Last active February 22, 2018 08:52
How to throttle upload speed using progress handler
/*
* RateThrottleProgress.cs
* Copyright (C) 2018 Kefei Lu
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
@yossorion
yossorion / what-i-wish-id-known-about-equity-before-joining-a-unicorn.md
Last active April 7, 2024 22:55
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

@mikoim
mikoim / README.md
Last active April 27, 2024 00:22
[Updated! Aug 14 2020] YouTube recommended encoding settings on ffmpeg (+ libx264)

Parameters

Container: MP4

Parameter YouTube recommends setting
-movflags faststart moov atom at the front of the file (Fast Start)

Video codec: H.264

@kflu
kflu / self-elevated.template.ps1
Created November 19, 2016 05:26
self elevated ps script
# this is from https://blogs.msdn.microsoft.com/virtual_pc_guy/2010/09/23/a-self-elevating-powershell-script/
# Get the ID and security principal of the current user account
$myWindowsID=[System.Security.Principal.WindowsIdentity]::GetCurrent()
$myWindowsPrincipal=new-object System.Security.Principal.WindowsPrincipal($myWindowsID)
# Get the security principal for the Administrator role
$adminRole=[System.Security.Principal.WindowsBuiltInRole]::Administrator
# Check to see if we are currently running "as Administrator"
@bishboria
bishboria / springer-free-maths-books.md
Last active April 25, 2024 06:27
Springer made a bunch of books available for free, these were the direct links
@magohl
magohl / gist:029efefbf15527b5f10d
Last active February 21, 2016 19:41
Raspberry Pi 2 - Install mono and ASP.NET 5
Raspian
-Resize sdcard
-Install mono
-Install DNVM
-Install DNVM Execution Env
-Download ASPNET samples
-Resore packages for HelloWorldMvc
-Run HelloWorldMvc
sudo raspi-config
@kflu
kflu / .ctags
Last active August 29, 2015 14:07 — forked from jesstelford/.ctags
--langdef=coffee
--langmap=coffee:.coffee
--regex-coffee=/(^|=[ \t])*class ([A-Za-z_][A-Za-z0-9_]+\.)*([A-Za-z_][A-Za-z0-9_]+)( extends .+)?$/\3/c,class/
--regex-coffee=/^[ \t]*(module\.)?(exports\.)?@?(([A-Za-z][A-Za-z0-9_.]*)+):.*[-=]>.*$/\3/m,method/
--regex-coffee=/^[ \t]*(module\.)?(exports\.)?(([A-Za-z][A-Za-z0-9_.]*)+)[ \t]*=.*[-=]>.*$/\3/f,function/
--regex-coffee=/^[ \t]*(([A-Za-z][A-Za-z0-9_.]*)+)[ \t]*=[^->\n]*$/\1/v,variable/
--regex-coffee=/^[ \t]*@(([A-Za-z][A-Za-z0-9_.]*)+)[ \t]*=[^->\n]*$/\1/f,field/
--regex-coffee=/^[ \t]*@(([A-Za-z][A-Za-z0-9_.]*)+):[^->\n]*$/\1/f,static field/
--regex-coffee=/^[ \t]*(([A-Za-z][A-Za-z0-9_.]*)+):[^->\n]*$/\1/f,field/
--regex-coffee=/((constructor|initialize):[ \t]*\()@(([A-Za-z][A-Za-z0-9_.]*)+)([ \t]*=[ \t]*[^,)]+)?/\3/f,field/
@tsiege
tsiege / The Technical Interview Cheat Sheet.md
Last active May 5, 2024 04:52
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

ANNOUNCEMENT

I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!






\

@XVilka
XVilka / TrueColour.md
Last active April 8, 2024 14:02
True Colour (16 million colours) support in various terminal applications and terminals

THIS GIST WAS MOVED TO TERMSTANDARD/COLORS REPOSITORY.

PLEASE ASK YOUR QUESTIONS OR ADD ANY SUGGESTIONS AS A REPOSITORY ISSUES OR PULL REQUESTS INSTEAD!

@mharsch
mharsch / gist:5943801
Last active April 18, 2018 11:38
Roomba power supply + serial interface for Raspberry Pi

Roomba exposes both unregulated battery voltage (+14v, GND), and a 5v TTL serial interface via it's mini-din connector. Also exposed is an active-low signal pin called DD (Device Detect) that can be used to wakeup a sleeping/off Roomba.

Rpi has a 3.3v TTL serial interface exposed on it's header pins. Also, Rpi exposes +5v, +3.3v, GND, as well as GPIO pins.

We can leverage the Roomba battery to power the Rpi by adding a voltage regulator circuit between the roomba min-din battery pins and the 5v/GND power pins on the Rpi header. I've chosen the following part from the RC community (called a UBEC Universal Battery Elimination Circuit) to power the Rpi: this or this

To convert the 5v Roomba signals (both serial and DD) to/from 3.3v, I've chosen this: