This file contains hidden or 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
<!DOCTYPE html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="description" content="Get local IP info stats from ipinfo.io API."> | |
<title>Local IP Info</title> | |
<link href="https://fonts.googleapis.com/css?family=Rokkitt" rel="stylesheet"> | |
<style> | |
body { | |
font-family: 'Rokkitt', serif; | |
margin: 0; |
This file contains hidden or 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
export const getDeepObjectProperty = function(ob, path, defaultValue){ | |
let segments = path.split('.'); | |
for (var i=0, len = segments.length; i < len; i++){ | |
if(!ob){ | |
return defaultValue; | |
} | |
ob = ob[segments[i]]; | |
}; | |
return ob; | |
}; |
This file contains hidden or 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
require('crypto').randomBytes(48, function(err, buffer) { var token = buffer.toString('hex'); console.log(token); }); |
This file contains hidden or 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
@mixin invert(){ | |
filter: invert(100%)!important; | |
-webkit-filter: invert(100%) !important; | |
-moz-filter: invert(100%)!important; | |
-ms-filter: invert(100%)!important; | |
-o-filter: invert(100%)!important; | |
} |
This file contains hidden or 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
const waitSeconds = (sec) => { | |
return new Promise((resolve, _reject) => { | |
setTimeout(resolve, 1000 * sec) | |
}); | |
} |