THIS GIST WAS MOVED TO TERMSTANDARD/COLORS
REPOSITORY.
PLEASE ASK YOUR QUESTIONS OR ADD ANY SUGGESTIONS AS A REPOSITORY ISSUES OR PULL REQUESTS INSTEAD!
Latency Comparison Numbers (~2012) | |
---------------------------------- | |
L1 cache reference 0.5 ns | |
Branch mispredict 5 ns | |
L2 cache reference 7 ns 14x L1 cache | |
Mutex lock/unlock 25 ns | |
Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
Compress 1K bytes with Zippy 3,000 ns 3 us | |
Send 1K bytes over 1 Gbps network 10,000 ns 10 us | |
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD |
// Steve Phillips / elimisteve | |
// 2013.01.03 | |
// Programming Challenge: Launch 4 threads, goroutines, coroutines, or whatever your language uses for concurrency, | |
// in addition to the main thread. In the first 3, add numbers together (see sample code below) and pass the results | |
// to the 4th thread. That 4th thread should receive the 3 results, add the numbers together, format the results as | |
// a string (see sample code), and pass the result back to `main` to be printed. | |
// | |
// Do this as succinctly and readably as possible. _Go!_ #golang #programming #concurrency #challenge | |
package main |
THIS GIST WAS MOVED TO TERMSTANDARD/COLORS
REPOSITORY.
PLEASE ASK YOUR QUESTIONS OR ADD ANY SUGGESTIONS AS A REPOSITORY ISSUES OR PULL REQUESTS INSTEAD!
So, it has been an interesting journey, but time to remove git-lfs. Here follows a summary of the approach I used to safely remove git-lfs,
git lfs uninstall
git lfs ls-files
git rm --cached
for each file
import os | |
os.system('stty -icanon') | |
os.system('stty -echo') | |
println('\x1b[?1003h\x1b[?1015h\x1b[?1006h') | |
for signal in 0 .. 64 { | |
os.signal(signal, fn() { | |
os.system('stty icanon') | |
os.system('stty echo') |
Synchronized output is merely implementing the feature as inspired by iTerm2 synchronized output,
except that it's not using the rare DCS but rather the well known SM ?
and RM ?
. iTerm2 has now also adopted to use the new syntax instead of using DCS.
When rendering the screen of the terminal, the Emulator usually iterates through each visible grid cell and renders its current state. With applications updating the screen a at higher frequency this can cause tearing.
This mode attempts to mitigate that.
Discord is now slowly rolling out the ability to send colored messages within code blocks. It uses the ANSI color codes, so if you've tried to print colored text in your terminal or console with Python or other languages then it will be easy for you.
To be able to send a colored text, you need to use the ansi
language for your code block and provide a prefix of this format before writing your text:
\u001b[{format};{color}m