This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# !!WARNING!! | |
# This will DELETE all efforts you have put into configuring nix | |
# Have a look through everything that gets deleted / copied over | |
nix-env -e '.*' | |
rm -rf $HOME/.nix-* | |
rm -rf $HOME/.config/nixpkgs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
download and install font from https://github.com/abertsch/Menlo-for-Powerline | |
set your vs code font to: | |
"terminal.external.osxExec": "iterm.app", | |
"terminal.integrated.shell.osx": "/bin/zsh", | |
"terminal.integrated.fontFamily": "Menlo for Powerline", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"workbench.colorCustomizations": { | |
// Contrast Colors - The contrast colors are typically only set for high contrast themes. If set, they add an additional border around items across the UI to increase the contrast. | |
"contrastActiveBorder": "", | |
"contrastBorder": "", | |
// Base Colors | |
"focusBorder": "", | |
"foreground": "", | |
"widget.shadow": "", | |
"selection.background": "", | |
"descriptionForeground": "", |
Thank you everybody, Your comments makes it better
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
I recently had several days of extremely frustrating experiences with service workers. Here are a few things I've since learned which would have made my life much easier but which isn't particularly obvious from most of the blog posts and videos I've seen.
I'll add to this list over time – suggested additions welcome in the comments or via twitter.com/rich_harris.
Chrome 51 has some pretty wild behaviour related to console.log
in service workers. Canary doesn't, and it has a load of really good service worker related stuff in devtools.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"use strict"; | |
var stackTrace = (new Error()).stack; // Only tested in latest FF and Chrome | |
var callerName = stackTrace.replace(/^Error\s+/, ''); // Sanitize Chrome | |
callerName = callerName.split("\n")[1]; // 1st item is this, 2nd item is caller | |
callerName = callerName.replace(/^\s+at Object./, ''); // Sanitize Chrome | |
callerName = callerName.replace(/ \(.+\)$/, ''); // Sanitize Chrome | |
callerName = callerName.replace(/\@.+/, ''); // Sanitize Firefox | |
console.log(callerName) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* converts a XYZ vector3 to longitude latitude (Direct Polar) | |
* @param lng longitude | |
* @param lat latitude | |
* @param vector3 optional output vector3 | |
* @returns a unit vector of the 3d position | |
*/ | |
function lonLatToVector3( lng, lat, out ) | |
{ | |
out = out || new THREE.Vector3(); |