Skip to content

Instantly share code, notes, and snippets.

View eshelman's full-sized avatar

Eliot Eshelman eshelman

View GitHub Profile
@eshelman
eshelman / latency.txt
Last active March 4, 2025 03:41 — forked from jboner/latency.txt
HPC-oriented Latency Numbers Every Programmer Should Know
Latency Comparison Numbers
--------------------------
L1 cache reference/hit 1.5 ns 4 cycles
Floating-point add/mult/FMA operation 1.5 ns 4 cycles
L2 cache reference/hit 5 ns 12 ~ 17 cycles
Branch mispredict 6 ns 15 ~ 20 cycles
L3 cache hit (unshared cache line) 16 ns 42 cycles
L3 cache hit (shared line in another core) 25 ns 65 cycles
Mutex lock/unlock 25 ns
L3 cache hit (modified in another core) 29 ns 75 cycles
@eshelman
eshelman / queryChatGPT.js
Last active April 1, 2023 15:18
Function for Google's AppScripts inside of Sheets - call OpenAI ChatGPT API
//
// Connect Google Sheets with OpenAI's GPT services
//
// WARNING: Sheets periodically re-evaluates cell contents. Some effort to minimize the effect is included in the code,
// but you will continue to rack up charges even if you are not making changes to the cells.
//
//
// The OpenAI API documentation is here:
// https://beta.openai.com/docs/api-reference/making-requests
//
@eshelman
eshelman / test.txt
Created July 3, 2018 13:34
test123
This is just a test
@eshelman
eshelman / test.txt
Created July 3, 2018 13:33
test123
This is just a test
@eshelman
eshelman / test.txt
Created July 3, 2018 13:28
test123
This is just a test
@eshelman
eshelman / test.txt
Created July 2, 2018 22:02
test123
This is just a test
@eshelman
eshelman / test.txt
Created July 2, 2018 21:59
test123
This is just a test
@eshelman
eshelman / SaltStack.minion.grains.items
Created January 5, 2014 01:33
Typical SaltStack output from running: salt '*' grains.items; salt '*' grains.ls; These are the static "grains" that are set by default. Custom grains can also be defined.
computenode1.localdomain:
biosreleasedate: 12/01/2006
biosversion: VirtualBox
cpu_flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 syscall nx rdtscp lm constant_tsc up rep_good pni monitor ssse3 lahf_lm
cpu_model: Intel(R) Celeron(R) CPU G530 @ 2.40GHz
cpuarch: x86_64
defaultencoding: UTF8
defaultlanguage: en_US
domain: localdomain
fqdn: computenode1.localdomain
@eshelman
eshelman / any-post.php.patch
Created July 22, 2013 01:34
Patches for WordPress "Broken Link Checker" Plugin (http://wordpress.org/support/plugin/broken-link-checker) Add full HTML search for Custom Fields. To apply these patches, first update Broken Link Checker to version 1.8.2. Then apply these patches inside your WordPress plugins directory (wp-content/plugins/broken-link-checker/)
--- ~/broken-link-checker/includes/any-post.php 2013-07-16 17:31:29.000000000 -0400
+++ broken-link-checker/includes/any-post.php 2013-07-21 21:27:17.000000000 -0400
@@ -74,6 +74,7 @@
//Highlight and nofollow broken links in posts & pages
if ( $this->plugin_conf->options['mark_broken_links'] || $this->plugin_conf->options['nofollow_broken_links'] ){
add_filter( 'the_content', array(&$this, 'hook_the_content') );
+ add_filter( 'blc_mark_broken_links', array(&$this, 'hook_the_content') );
if ( $this->plugin_conf->options['mark_broken_links'] && !empty( $this->plugin_conf->options['broken_link_css'] ) ){
add_action( 'wp_head', array(&$this,'hook_wp_head') );
}
### Keybase proof
I hereby claim:
* I am eshelman on github.
* I am eshelman (https://keybase.io/eshelman) on keybase.
* I have a public key whose fingerprint is 7845 15B9 5064 6596 9B40 A5F3 7699 60DE F83D CCEE
To claim this, I am signing this object: