View pako_inflate.min.mjs
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
/** | |
* @license ZLIB | |
* @copyright Copyright (c) 1995-2013 Jean-loup Gailly and Mark Adler {@link http://zlib.net} | |
* @license The MIT License (MIT) | |
* @copyright Copyright (c) 2014-2017 Vitaly Puzrin and Andrei Tuputcyn {@link https://github.com/nodeca/pako/tree/master/lib/zlib} | |
* @copyright Copyright (c) 2019-2021 Lauro Moraes {@link https://github.com/subversivo58} | |
* @see https://github.com/nodeca/pako | |
*/let pako;!function(a){pako=a()}(function(){return function b(c,e,g){function d(h,i){if(!e[h]){if(!c[h]){var j="function"==typeof require&&require;if(!i&&j)return j(h,!0);if(a)return a(h,!0);var f=new Error("Cannot find module '"+h+"'");throw f.code="MODULE_NOT_FOUND",f}var k=e[h]={exports:{}};c[h][0].call(k.exports,function(a){var b=c[h][1][a];return d(b||a)},k,k.exports,b,c,e,g)}return e[h].exports}for(var a="function"==typeof require&&require,f=0;f<g.length;f++)d(g[f]);return d}({1:[function(b,c,d){"use strict";function f(a,b){return Object.prototype.hasOwnProperty.call(a,b)}var e="undefined"!=typeof |
View custom-error.js
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'; | |
module.exports = function CustomError(message, extra) { | |
Error.captureStackTrace(this, this.constructor); | |
this.name = this.constructor.name; | |
this.message = message; | |
this.extra = extra; | |
}; | |
require('util').inherits(module.exports, Error); |
View fence.js
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
window.onload = function() { | |
var startPos; | |
var startPosLat; | |
var startPosLong; | |
var distance; | |
if (navigator.geolocation) { | |
startPosLat = 44.95716993150707; | |
startPosLong = -93.28439280496818; |
View gist:4fdcd3739d74e631d1c03827ad513e8c
People
![]() :bowtie: |
😄 :smile: |
😆 :laughing: |
---|---|---|
😊 :blush: |
😃 :smiley: |
:relaxed: |
😏 :smirk: |
😍 :heart_eyes: |
😘 :kissing_heart: |
😚 :kissing_closed_eyes: |
😳 :flushed: |
😌 :relieved: |
😆 :satisfied: |
😁 :grin: |
😉 :wink: |
😜 :stuck_out_tongue_winking_eye: |
😝 :stuck_out_tongue_closed_eyes: |
😀 :grinning: |
😗 :kissing: |
😙 :kissing_smiling_eyes: |
😛 :stuck_out_tongue: |
View GithubApiPush.js
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
/** | |
* Wraper to upload binary files to GitHub repo | |
* Uses the modified GitHub library under the hood and exposes it as `GHInstance` property for get instance of all methods | |
* @note: | |
* -- inspired at article: @see <https://medium.freecodecamp.org/pushing-a-list-of-files-to-the-github-with-javascript-b724c8c09b66> | |
* -- issue (not yet resolved): @see issue <https://github.com/github-tools/github/issues/417> | |
* @copyright Copyright (c) 2020 Lauro Moraes <https://github.com/subversivo58> | |
* @license MIT License <https://github.com/subversivo58/subversivo58.github.io/blob/master/LICENSE> | |
*/ | |
const GithubAPI = function(auth) { |
View sendBeacon.js
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
/** | |
* SendBeacon - beaultifull unopinated aproach | |
* @param {String} uri - target URL (absolute or relative) | |
* @param {Object} data - JavaScript {Object} to serialize with `JSON.stringify()` | |
* @param {String} auth - optional server authentication key/nonce to request (merge to data) | |
*/ | |
function Beacon(uri, data, auth = false) { | |
// is Chrome? | |
let isChrome = !!window.chrome && !window.opera || !navigator.userAgent.indexOf(' OPR/') >= 0 | |
try { |
View is-private-mode.js
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
/** | |
* Detect if the browser is running in Private Browsing mode | |
*/ | |
function isPrivateMode() { | |
return new Promise((resolve) => { | |
const on = () => resolve(true); // is in private mode | |
const off = () => resolve(false); // not private mode | |
const testLocalStorage = () => { | |
try { | |
if (localStorage.length) off(); |
View custon-input.css
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
.custom-file, | |
.custom-file-control, | |
.custom-file-input { | |
height: 2.3rem!important; | |
} | |
/* add FontAwesome icon for input (optional) */ | |
.custom-file-control::before { | |
font-family: 'FontAwesome'; | |
content: "\f03e"!important; | |
height: 2.3rem!important; |
View Android-Notification-Example.js
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
/** | |
* @see font: https://developer.android.com/guide/topics/ui/notifiers/notifications.html | |
*/ | |
NotificationCompat.Builder mBuilder = | |
new NotificationCompat.Builder(this) | |
.setSmallIcon(R.drawable.notification_icon) | |
.setContentTitle("My notification") | |
.setContentText("Hello World!"); | |
// Creates an explicit intent for an Activity in your app | |
Intent resultIntent = new Intent(this, ResultActivity.class); |
NewerOlder