Skip to content

Instantly share code, notes, and snippets.

Dan McGrady dmix

View GitHub Profile
@dmix
dmix / math.txt
Last active Jun 8, 2020
African-Americans deaths by police 2019 vs <55 African-American deaths by COVID-19 in 2020
View math.txt
Results
-----------------------------------------------
African-Americans killed by police 2019:
total = 9
percent of all 48 million african-americans = 0.0000001882845
African-Americans <55 killed by COVID-19 in 2020:
total = 2093
percentage of all 34.4 million <55 african-americans = 0.000060814737331473733147373314737331473733147373314737331
@dmix
dmix / math.md
Created Jun 8, 2020
African-Americans deaths by police 2019 vs <55 African-American deaths by COVID-19 in 2020
View math.md

Results

African-Americans killed by police 2019: total = 9 percent of all 48 million = 0.0000001882845

African-Americans <55 killed by COVID-19 in 2020: total = 2093 percentage of all 34.4 million <55 = 0.000060814737331473733147373314737331473733147373314737331

View gist:7bc336d7ceaf486f329d8e8270640088
<template>
<p>{{ hello }}</p>
</template>
<script>
export default {
data() {
return {
hello: 'Hello World!'
}
@dmix
dmix / aliases.ev
Last active Jul 17, 2017
elvish aliases
View aliases.ev
# ==============================================================================
# Elvish Aliases
# ==============================================================================
# Aliases
# -----------------------------------------------------------------------------
# Git
git-aliases = [
&prefix= "g"
@dmix
dmix / gist:7abfe3f0f9c4d79f751b
Last active Oct 28, 2015
Sort Archlinux AUR packages by votes when querying with Yaourt
View gist:7abfe3f0f9c4d79f751b
yaourt vim > vim.log
cat vim.log | awk '/aur/{print $1 $2 " " $4}' | sed -r 's/\(Out of date\)//g' | sed -r 's/([0-9]*)(\S+)\s\(([0-9]*)\)/\3 - \2/g' | sort -n
OR
yaourt vim | awk '/aur/{print $1 $2 " " $4}' | sed -r 's/\(Out of date\)//g' | sed -r 's/([0-9]*)(\S+)\s\(([0-9]*)\)/\3 - \2/g' | sort -n
[press enter when asked to enter a package number to install]
View gist:be824817540886989ef3
Host *
PasswordAuthentication no
ChallengeResponseAuthentication no
PubkeyAuthentication yes
HostKeyAlgorithms ssh-ed25519-cert-v01@openssh.com,ssh-rsa-cert-v01@openssh.com,ssh-ed25519,ssh-rsa
Ciphers chacha20-poly1305@openssh.com,aes256-gcm@openssh.com,aes128-gcm@openssh.com,aes256-ctr,aes192-ctr,aes128-ctr
View .cvimrc
"set noautofocus
set cncpcompletion
" set nohud
set autohidecursor
set numerichints
let scrollduration = 10
let searchlimit = 40
let searchengine mdn = "https://developer.mozilla.org/en-US/search?q="
let searchengine stackoverflow = "http://stackoverflow.com/search?q="
let searchalias s = "stackoverflow"
@dmix
dmix / gist:95cda916a5f9aeadd87a
Created Jul 7, 2015
Benchmark: minify/concat javascript load times when injecting content scripts via Chrome extension
View gist:95cda916a5f9aeadd87a
Overview:
Does minifying/concating JS files make a difference if you're loading files via a chrome extension - since it loads js files from disk and not over network?
Legend:
load = loading files from disk (not network since via extension)
execute = time from injecting <script> tags to when all variables are loaded and functions are executing
ready = all JS/HTML/CSS are finished loading aka jquery document.ready
View final code that gets sent to eval()
eval(base64_decode(ZXZhbChiYXNlNjRfZGVjb2RlKFpYWmhiQ2hpWVhObE5qUmZaR1ZqYjJSbEtGcFlXbWhpUTJocFdWaE9iRTVxVW1aYVIxWnFZakpTYkV0RlRsaGlSekZNVWpGdmVGbHRNVTlOUjBaWVQxaFdXVTFzV1RCWlZtaFBUVWRPTlZveU5WcE5NVm8xV1d0Wk5XTkhTblJpUkVKTFpWZDBkMUV5WkhOT01FNXVZVEJ3UzFOR1dqVlphMDVDVDFWc1JGTnRPV3RUUmtvelZESnJOR1J0Um5SU2FrcGFWMFpLYzFreU1IZGxSWGgxVVdwT1RVMXVRbTlhUnpGR1pHMUdkVkpxUm1GWFJXOHhWRVpTUm1SVk5YQk9TSEJOWWxSR2QxbHRhekZqVjA0MVUxUmtSRm95ZEV0VGEyUlBZakJzUlUxSFpGcE5NVm8xV1d0Wk5XTkhTblJpUkVKTVVUSnpNMUV5WkhKVGEzQkpWVzVDYVZZeFdqSmFSbWhTV2pGQ1ZGRlVSbEJrTWpsTFVURmtUMDFYVG5SbFIxcHFUV3haZDFscVRrTk5SWFJFVlcxd2FGRXphRVZXYkZwTFZGWlJlRkZzVmxsTlZscFVWa1ZPTTJFeVVsbFRiazVNVmtoT1RGRXhSbk5oYlZKWlUyNU9XVTB3TlhOYVJXTTFaREpTUkZveWRGcE5iV1I2VlZSR1YxVXhVa1pQVmtaWFVtcHNWRlZzV2xOV2JGWnlUbFpXVm1Fd1dsQldWRUpoVW14V2NHUXphRXhXU0U1TVVURkdjMkZ0VWxsVGJrNVpUVEExYzFwRll6VmtNbEpFV2pKMFdrMXRaSHBWVkVaWFZURlNSazlXUmxkU2FteEZWa1JCTVZReFNsWlViRlpYVWxkNFQxVnNWVFZX.YkZwRVpESjBhMUl5ZURCWGJHTTFUVmRTUkdGNlpFUmFNblJMVTJ0a1UyRkhVa2hTVjJSUlZUQktjVnBHYUV0ak1XZDVWbXBTWVZZd01Y
View gist:a3d4a0b63f42a691c41a
/home/user/.rvm/rubies/ruby-2.1.4/lib/ruby/2.1.0/net/http.rb:920:in `connect': SSL_connect SYSCALL returned=5 errno=0 state=SSLv2/v3 read server hello A (Faraday::SSLError)
from /home/user/.rvm/rubies/ruby-2.1.4/lib/ruby/2.1.0/net/http.rb:920:in `block in connect'
from /home/user/.rvm/rubies/ruby-2.1.4/lib/ruby/2.1.0/timeout.rb:76:in `timeout'
from /home/user/.rvm/rubies/ruby-2.1.4/lib/ruby/2.1.0/net/http.rb:920:in `connect'
from /home/user/.rvm/rubies/ruby-2.1.4/lib/ruby/2.1.0/net/http.rb:863:in `do_start'
from /home/user/.rvm/rubies/ruby-2.1.4/lib/ruby/2.1.0/net/http.rb:852:in `start'
from /home/user/.rvm/rubies/ruby-2.1.4/lib/ruby/2.1.0/net/http.rb:1369:in `request'
from /home/user/.rvm/rubies/ruby-2.1.4/lib/ruby/gems/2.1.0/gems/faraday-0.9.1/lib/faraday/adapter/net_http.rb:82:in `perform_request'
from /home/user/.rvm/rubies/ruby-2.1.4/lib/ruby/gems/2.1.0/gems/faraday-0.9.1/lib/faraday/adapter/net_http.rb:40:in `block in call'
You can’t perform that action at this time.