Visit Gist and see 'raw' link, It's including SHA-1 long hash name like this.
https://gist.github.com/raw/2370972/47150711fedb7375d19d761ab122485b8105678d/gist-raw-perm-HEAD.user.js
#! /usr/bin/env python | |
""" Convert values between RGB hex codes and xterm-256 color codes. | |
Nice long listing of all 256 colors and their codes. Useful for | |
developing console color themes, or even script output schemes. | |
Resources: | |
* http://en.wikipedia.org/wiki/8-bit_color | |
* http://en.wikipedia.org/wiki/ANSI_escape_code |
let g:tagbar_type_php = { | |
\ 'ctagstype' : 'php', | |
\ 'kinds' : [ | |
\ 'i:interfaces', | |
\ 'c:classes', | |
\ 'd:constant definitions', | |
\ 'f:functions', | |
\ 'j:javascript functions:1' | |
\ ] |
Visit Gist and see 'raw' link, It's including SHA-1 long hash name like this.
https://gist.github.com/raw/2370972/47150711fedb7375d19d761ab122485b8105678d/gist-raw-perm-HEAD.user.js
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 |
This bash script offers quick shortcuts to simulate slower network connections. It is useful when you need to simulate a wireless network on a Linux network server, especially when you are using a virtual machine guest on your local machine or in the cloud.
slow 3G # Slow network on default eth0 down to 3G wireless speeds
slow reset # Reset connection for default eth0 to normal
slow vsat --latency=500ms # Simulate satellite internet with a high latency
slow dsl -b 1mbps # Simulate DSL with a slower speed than the default
slow modem-56k -d eth0 # Simulate a 56k modem on the eth1 device. eth0 is unchanged.
Problem: When linking to the raw version of a gist, the link changes with each revision.
Solution:
To return the first file from a gist: https://gist.github.com/[gist_user]/[gist_id]/raw/
To get a file from multi–file gist: https://gist.github.com/[gist_user]/[gist_id]/raw/[file_name]
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
#!/bin/bash | |
delay=0.2 | |
title='default' | |
count=0 | |
loop=1 #0 for infinite loop | |
# Set if you want to skip mouse selection | |
if [[ $# -eq 6 ]] | |
then |
This bash script offers quick shortcuts to simulate slower network connections. It is useful when you need to simulate a wireless network on a Linux network server, especially when you are using a virtual machine guest on your local machine or in the cloud.
slow 3G # Slow network on default eth0 down to 3G wireless speeds
slow 3G -l 600ms -p 10% # slow network on eth0 and setup latency to 600ms packetloss to 10%
slow reset # Reset connection for default eth0 to normal
slow vsat --latency=500ms # Simulate satellite internet with a high latency
slow dsl -b 1mbps # Simulate DSL with a slower speed than the default
Now located at https://github.com/JeffPaine/beautiful_idiomatic_python.
Github gists don't support Pull Requests or any notifications, which made it impossible for me to maintain this (surprisingly popular) gist with fixes, respond to comments and so on. In the interest of maintaining the quality of this resource for others, I've moved it to a proper repo. Cheers!