Skip to content

Instantly share code, notes, and snippets.

View swsoyee's full-sized avatar
💤
zzZ...

InfinityLoop swsoyee

💤
zzZ...
View GitHub Profile
@swsoyee
swsoyee / shim.R
Created September 23, 2020 13:41 — forked from wch/shim.R
Shim system.file for htmlwidgets so that a dependent package can be used with devtools::load_all()
shim_system_file <- function(package) {
imports <- parent.env(asNamespace(package))
pkgload:::unlock_environment(imports)
imports$system.file <- pkgload:::shim_system.file
}
shim_system_file("htmlwidgets")
shim_system_file("htmltools")
# After the code above has been run, you can load an in-development package
@swsoyee
swsoyee / index.js
Created November 25, 2019 06:31 — forked from MoOx/index.js
Export/import github labels
// go on you labels pages
// eg https://github.com/cssnext/cssnext/labels
// paste this script in your console
// copy the output and now you can import it using https://github.com/popomore/github-labels !
var labels = [];
[].slice.call(document.querySelectorAll(".label-link"))
.forEach(function(element) {
labels.push({
name: element.textContent.trim(),