Skip to content

Instantly share code, notes, and snippets.

View johnmaxwell's full-sized avatar

John Maxwell johnmaxwell

  • Atlanta, GA
View GitHub Profile
class Array
def bifurcate(size=length)
if size < 0
raise ArgumentError, "attempt to bifurcate using negative size"
end
[take(size), drop(size)]
end
end
function sayHi() {
console.log("hi");
}
function blackhole() {
while (true) {
1 + 1;
}
}
setInterval((function () { sayHi() }), 1000);
setTimeout((function () { blackhole() }), 5000);
@johnmaxwell
johnmaxwell / gist:f87a1c4b0e40a5b31cc0b7e8a206b8b0
Created January 2, 2018 19:28
first page load after powder restart
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!
@johnmaxwell
johnmaxwell / gist:99495d1adf613ffb492f05cd7b0b5006
Created January 2, 2018 19:31
deprecations following rails test start
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:4f3c76425716002489b7e90fe41bf680
Created January 8, 2018 01:59
powprox-create-root-ca.diff
--- 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"
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",
mysql> show variables like '%doublewrite%';
+--------------------+-------+
| Variable_name | Value |
+--------------------+-------+
| innodb_doublewrite | ON |
+--------------------+-------+
1 row in set (0.02 sec)
mysql> show variables like '%bin%';
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 |