Skip to content

Instantly share code, notes, and snippets.

Dan McGrady dmix

Block or report user

Report or block dmix

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
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'
View gist:10361e8a3d9acab00927
/usr/lib/go/pkg/tool/linux_amd64/cgo:00000000007d9cc0 d runtime/race(.data.rel.ro._ZTVN6__tsan13ThreadContextE)
/usr/lib/go/pkg/tool/linux_amd64/cgo:00000000007d8f00 d runtime/race(.data.rel.ro._ZTVN6__tsan8CallbackE)
/usr/lib/go/pkg/tool/linux_amd64/cgo:000000000060eed0 t runtime/race(.text._ZN6__tsan6VectorINS_10RacyStacksEE8PushBackERKS1_)
/usr/lib/go/pkg/tool/linux_amd64/cgo:000000000060efc0 t runtime/race(.text._ZN6__tsan6VectorINS_11RacyAddressEE8PushBackERKS1_)
/usr/lib/go/pkg/tool/linux_amd64/cgo:000000000060f520 t runtime/race(.text._ZN6__tsan8Callback6UnwindEv)
/usr/lib/go/pkg/tool/linux_amd64/cgo:000000000060ee20 t runtime/race(.text._ZN6__tsan8Callback9UniqueTidEv)
/usr/lib/go/pkg/tool/linux_amd64/cgo:00000000005fa6d0 T __tsan_acquire
/usr/lib/go/pkg/tool/linux_amd64/cgo:00000000005f2900 T __tsan_default_options
/usr/lib/go/pkg/tool/linux_amd64/cgo:00000000005f9cf0 T __tsan_finalizer_goroutine
/usr/lib/go/pkg/tool/linux_amd64/cgo:00000000005fe410 T __tsan_fini
View gist:f47f304c40e1d331ea5d
ota_server git:(master) ✗ strace -f go install github.com/mattn/go-sqlite3
execve("/usr/bin/go", ["go", "install", "github.com/mattn/go-sqlite3"], [/* 52 vars */]) = 0
brk(0) = 0xaaa6e8
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=192233, ...}) = 0
mmap(NULL, 192233, PROT_READ, MAP_PRIVATE, 3, 0) = 0x3017b0cd000
close(3) = 0
open("/usr/lib/libpthread.so.0", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\340`\0\0\0\0\0\0"..., 832) = 832
You can’t perform that action at this time.