$ echo 'gem "webpacker"' >> Gemfile
$ bundle install
$ rails webpacker:install
$ yarn add [email protected] jquery popper.js
diff --git a/config/webpack/environment.js b/config/webpack/environment.js
index d16d9af..86bf1a7 100644
import React from "react"; | |
let lsBus = {}; | |
let ssBus = {}; | |
/** | |
* Redraw all components that have a hook to localStorage with the given key. | |
* @param {string} key | |
* @param {*} newValue | |
*/ |
$ echo 'gem "webpacker"' >> Gemfile
$ bundle install
$ rails webpacker:install
$ yarn add [email protected] jquery popper.js
diff --git a/config/webpack/environment.js b/config/webpack/environment.js
index d16d9af..86bf1a7 100644
Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...
// see: https://github.com/chadoe/docker-cleanup-volumes
$ docker volume rm $(docker volume ls -qf dangling=true)
$ docker volume ls -qf dangling=true | xargs -r docker volume rm
/* bling.js */ | |
window.$ = document.querySelector.bind(document); | |
window.$$ = document.querySelectorAll.bind(document); | |
Node.prototype.on = window.on = function(name, fn) { this.addEventListener(name, fn); }; | |
NodeList.prototype.__proto__ = Array.prototype; | |
NodeList.prototype.on = function(name, fn) { this.forEach((elem) => elem.on(name, fn)); }; |
;;; gh-link.el --- Create URLs to a buffer's location in its GitHub repository | |
;; Author: Skye Shaw <[email protected]> | |
;; Version: 0.0.1 | |
;;; Commentary: | |
;; Create a URL representing the current buffer's location in its GitHub repository at | |
;; the current line number or active region. The URL will be added to the kill ring. | |
;; |
package main | |
import ( | |
"bytes" | |
"flag" | |
"fmt" | |
"github.com/bmizerany/aws4" | |
"io/ioutil" | |
"log" | |
"net/http" |
# Tested in Ruby 1.8.7 | |
class ParentClass | |
def call_private_good | |
# Private methods can only be called without an explicit receiver | |
private_test | |
end | |
def call_private_bad | |
# Calling a private method with an explicit receiver (self) will fail |
-- show running queries (pre 9.2) | |
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query | |
FROM pg_stat_activity | |
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%' | |
ORDER BY query_start desc; | |
-- show running queries (9.2) | |
SELECT pid, age(clock_timestamp(), query_start), usename, query | |
FROM pg_stat_activity | |
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%' |