brew install mkcert
mkcert -install
// source: https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent/CustomEvent | |
;(function() { | |
if (typeof window.CustomEvent === "function") return false | |
function CustomEvent(event, params) { | |
params = params || { bubbles: false, cancelable: false, detail: undefined } | |
var evt = document.createEvent("CustomEvent") | |
evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail) | |
return evt | |
} |
# install Homebrew | |
$ su ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
# show brew commands | |
$ brew help | |
# check current user | |
$ echo $(whoami) | |
# grant access to the folders |
/** | |
* Get path data for a rounded rectangle. Allows for different radius on each corner. | |
* @param {Number} w Width of rounded rectangle | |
* @param {Number} h Height of rounded rectangle | |
* @param {Number} tlr Top left corner radius | |
* @param {Number} trr Top right corner radius | |
* @param {Number} brr Bottom right corner radius | |
* @param {Number} blr Bottom left corner radius | |
* @return {String} Rounded rectangle SVG path data | |
*/ |
cat file.fa | awk '$0 ~ ">" {print c; c=0;printf substr($0,2,100) "\t"; } $0 !~ ">" {c+=length($0);} END { print c; }' |
<?xml version="1.0" encoding="utf-8"?> | |
<Client name="Sony Bravia 2014"> | |
<Identification> | |
<Header name="X-AV-Client-Info" regex=".*KDL-\d{2}[WR][5689]\d{2}B.*" /> | |
<DeviceDescription> | |
<Manufacturer substring="Sony" /> | |
<FriendlyName regex="KDL-\d{2}[WR][5689]\d{2}B.*" /> | |
</DeviceDescription> | |
</Identification> | |
<DeviceDescription> |
ExportPlot <- function(gplot, filename, width=2, height=1.5) { | |
# Export plot in PDF and EPS. | |
# Notice that A4: width=11.69, height=8.27 | |
ggsave(paste(filename, '.pdf', sep=""), gplot, width = width, height = height) | |
postscript(file = paste(filename, '.eps', sep=""), width = width, height = height) | |
print(gplot) | |
dev.off() | |
png(file = paste(filename, '_.png', sep=""), width = width * 100, height = height * 100) | |
print(gplot) | |
dev.off() |