theme | class | highlighter | fonts | ||||||
---|---|---|---|---|---|---|---|---|---|
default |
text-center |
MaskRay |
|
Make sure there is at least one file in it (even just the README.md)
ssh-keygen -t rsa -C "[email protected]"
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# put this in your ~/.gitconfig, then issue `git lg` will get you a pretty git branch topology view | |
# | |
# this is just a start point, customizations can be done by further fine tuning referencing | |
# https://git-scm.com/docs/git-log & https://git-scm.com/docs/pretty-formats | |
# | |
# --graph draws the git commits tree | |
# --date=local is used in the following --format | |
# | |
# format explanation: | |
# %C(colorname)xxx%C(reset) encloses text `xxx` with color `colorname` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Remove anything linked to nvidia | |
sudo apt-get remove --purge nvidia* | |
sudo apt-get autoremove | |
# Search for your driver | |
apt search nvidia | |
# Select one driver (the last one is a decent choice) | |
sudo apt install nvidia-370 |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
When the directory structure of your Node.js application (not library!) has some depth, you end up with a lot of annoying relative paths in your require calls like:
const Article = require('../../../../app/models/article');
Those suck for maintenance and they're ugly.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// adapted from http://www.youtube.com/watch?v=qNM0k522R7o | |
extern vec2 size; | |
extern int samples = 5; // pixels per axis; higher = bigger glow, worse performance | |
extern float quality = 2.5; // lower = smaller glow, better quality | |
vec4 effect(vec4 colour, Image tex, vec2 tc, vec2 sc) | |
{ | |
vec4 source = Texel(tex, tc); | |
vec4 sum = vec4(0); |
L1 cache reference ......................... 0.5 ns
Branch mispredict ............................ 5 ns
L2 cache reference ........................... 7 ns
Mutex lock/unlock ........................... 25 ns
Main memory reference ...................... 100 ns
Compress 1K bytes with Zippy ............. 3,000 ns = 3 µs
Send 2K bytes over 1 Gbps network ....... 20,000 ns = 20 µs
SSD random read ........................ 150,000 ns = 150 µs
Read 1 MB sequentially from memory ..... 250,000 ns = 250 µs
NewerOlder