Skip to content

Instantly share code, notes, and snippets.

Avatar

John Maxwell johnmaxwell

  • Decatur, GA
View GitHub Profile
View gist:51755dac274e37463314c14a44514cea
mysql> show variables like '%innodb%';
+------------------------------------------+------------------------+
| Variable_name | Value |
+------------------------------------------+------------------------+
| ignore_builtin_innodb | OFF |
| innodb_adaptive_flushing | ON |
| innodb_adaptive_flushing_lwm | 10 |
| innodb_adaptive_hash_index | ON |
| innodb_adaptive_hash_index_parts | 8 |
| innodb_adaptive_max_sleep_delay | 150000 |
View gist:51282a2db2ae2d31e1c4d18cbc9a076e
mysql> show variables like '%doublewrite%';
+--------------------+-------+
| Variable_name | Value |
+--------------------+-------+
| innodb_doublewrite | ON |
+--------------------+-------+
1 row in set (0.02 sec)
mysql> show variables like '%bin%';
View gist:132c618846fd32ca4c52b080d9f3e5f0
ids = ["24884", "24713", "24685", "24683", "24680", "24670", "24668", "24665", "24664", "24659", "24658", "24655", "24648", "24646", "24644", "24642", "24637", "24636", "24633", "24625", "24624", "24612", "24610", "24606", "24602", "24600", "24598", "24593", "24582", "24577", "24575", "24541", "24538", "24533", "24528", "24518", "24517", "24511", "24466", "24451", "24450", "24441", "24405", "24324", "24320", "24318", "24315", "24314", "24311", "24306", "24305", "24298", "24272", "24257", "24110", "24109", "24097", "24095", "24092", "24074", "24048", "24042", "23957", "23930", "23925", "23818", "23813", "23756", "23731", "23683", "23673", "23622", "23606", "23605", "23603", "23601", "23538", "23537", "23254", "23252", "23251", "23152", "23138", "23118", "23052", "23051", "23035", "22942", "22922", "22908", "22906", "22852", "22848", "22843", "22832", "22830", "22829", "22797", "22758", "22471", "22442", "22416", "22387", "22379", "22366", "22251", "22242", "22191", "22045", "21930", "21929", "21921", "21797",
@johnmaxwell
johnmaxwell / gist:4f3c76425716002489b7e90fe41bf680
Created January 8, 2018 01:59
powprox-create-root-ca.diff
View gist:4f3c76425716002489b7e90fe41bf680
--- a/libexec/powprox-create-root-ca
+++ b/libexec/powprox-create-root-ca
@@ -28,4 +28,4 @@ powprox-openssl ca -selfsign -batch \
powprox-openssl x509 -in ca/pow-root-ca.crt -noout -text
# Add to Keychain trusted root
-security add-trusted-cert -k login.keychain-db "$POWPROX_DIR/ssl/ca/pow-root-ca.crt"
+security add-trusted-cert -k login.keychain "$POWPROX_DIR/ssl/ca/pow-root-ca.crt"
@johnmaxwell
johnmaxwell / gist:99495d1adf613ffb492f05cd7b0b5006
Created January 2, 2018 19:31
deprecations following rails test start
View gist:99495d1adf613ffb492f05cd7b0b5006
DEPRECATION WARNING: before_filter is deprecated and will be removed in Rails 5.1. Use before_action instead. (called from <top (required)> at /Users/john/work/3rdhome/config/application.rb:7)
DEPRECATION WARNING: before_filter is deprecated and will be removed in Rails 5.1. Use before_action instead. (called from <top (required)> at /Users/john/work/3rdhome/config/application.rb:7)
Expected string default value for '--jbuilder'; got true (boolean)
Expected string default value for '--serializer'; got true (boolean)
Running via Spring preloader in process 30726
Run options: --seed 5460
# Running:
@johnmaxwell
johnmaxwell / gist:f87a1c4b0e40a5b31cc0b7e8a206b8b0
Created January 2, 2018 19:28
first page load after powder restart
View gist:f87a1c4b0e40a5b31cc0b7e8a206b8b0
DEPRECATION WARNING: ActiveRecord::Base.raise_in_transactional_callbacks= is deprecated, has no effect and will be removed without replacement. (called from <top (required)> at /Users/john/work/3rdhome/config/environment.rb:5)
DEPRECATION WARNING: after_filter is deprecated and will be removed in Rails 5.1. Use after_action instead. (called from <top (required)> at /Users/john/work/3rdhome/config/environment.rb:5)
DEPRECATION WARNING: alias_method_chain is deprecated. Please, use Module#prepend instead. From module, you can access the original method using super. (called from <top (required)> at /Users/john/work/3rdhome/config/environment.rb:5)
DEPRECATION WARNING: In Rails 5.1, The `:subdomains` option of HSTS config will be treated as true if
unspecified. Set `config.ssl_options = { hsts: { subdomains: false } }` to opt out
of this behavior.
(called from <top (required)> at /Users/john/work/3rdhome/config/environment.rb:5)
DEPRECATION WARNING: Active Admin: using `action_item` without a name is deprecated!
View gist:6bfcacdb15de2f535b2aaff938b107f2
function sayHi() {
console.log("hi");
}
function blackhole() {
while (true) {
1 + 1;
}
}
setInterval((function () { sayHi() }), 1000);
setTimeout((function () { blackhole() }), 5000);
View bifurcate.rb
class Array
def bifurcate(size=length)
if size < 0
raise ArgumentError, "attempt to bifurcate using negative size"
end
[take(size), drop(size)]
end
end
@johnmaxwell
johnmaxwell / gist:67e77f213090b838776eea557e712cf9
Created July 6, 2016 18:46
Curl some JSON and then print it out all pretty-like
View gist:67e77f213090b838776eea557e712cf9
curl "http://jsonip.com" | ruby -e "require 'json'; puts JSON.pretty_generate(JSON.parse(STDIN.gets))"
# {
# "ip": "....",
# "about": "/about",
# "Pro!": "http://getjsonip.com"
# }
# Here's one that copies it straight into your clipboard (on the Mac)
curl "http://jsonip.com" | ruby -e "require 'json'; puts JSON.pretty_generate(JSON.parse(STDIN.gets))" | pbcopy
View gist:813b33ca699bb320c818
If you're a Republican who is aghast by Trump and his supporters, and if you believe that Trump is ruining your otherwise decent party, I hope your are asking yourself, "Why am I surprised by this? Is this what I've been supporting with my votes?"
The answer is yes. Trump isn't ruining your party. He's just making its less flattering core more obvious. Other GOP candidates ordinarily gloss over the fact that . They smile and invoke euphemisms about protecting family or raising concern about law and order, but they support the same ignorant