/*
* @description Fly High With Image Handle
* @ri7nz - Hello :D
*/
const FileOrBlob = new File([
ArrayBuffer
|| ArrayBufferView
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
| #!/usr/bin/env node | |
| const sharp = require('sharp') | |
| const listSize = [500, 192, 150, 64] | |
| const original = sharp('./public/logo.png') | |
| listSize.forEach(imgSize => { | |
| original | |
| .resize(imgSize, imgSize) | |
| .toFile(`./public/logo${imgSize}.png`) | |
| .then(res => { |
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
| /** | |
| * @link {https://stackoverflow.com/questions/20058391/javascript-dependency-injection} | |
| */ | |
| var Injector = { | |
| dependencies: {}, | |
| add : function(qualifier, obj){ | |
| this.dependencies[qualifier] = obj; | |
| }, | |
| get : function(func){ | |
| var obj = new func; |
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
| <!-- import here your svg logo (in drawables) | |
| See https://stackoverflow.com/questions/30923205/easiest-way-to-use-svg-in-android/39266840#39266840 | |
| --> |
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
| import YourComponent from 'your/path/Component' | |
| /** | |
| * @name ComponentFly | |
| * @param {ReactElement} Component | |
| * @param {function} reduceParam | |
| * @return {ReactElement} | |
| * @example | |
| * const ComponentFlying = ComponentFly(YourComponent)(reduceParam) | |
| * Array.map(ComponentFlying) | |
| */ |
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
| /** | |
| * @description Learning How Object is Work for your Own State Management | |
| * @author ri7nz <[email protected]> | |
| * @link {github.com/ri7nz} | |
| * Just For Fun In Javascript 🤟 | |
| */ | |
| class CreateYourOwnState { | |
| #state | |
| #stateNameInWindow | |
| constructor() { |
// Checking
$ ssh -vT [email protected]
// output
// debug1: Reading configuration data /etc/ssh/ssh_config
// shim layer for requestAnimationFrame with setTimeout fallback
// from http://paulirish.com/2011/requestanimationframe-for-smart-animating/
var requestAnimFrame = (function(){
return window.requestAnimationFrame ||
window.webkitRequestAnimationFrame ||
window.mozRequestAnimationFrame ||
window.oRequestAnimationFrame ||
window.msRequestAnimationFrame ||
function( callback ){
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
| /** | |
| * @description | |
| * this script for replace environment variable from public directory | |
| * of Create-React-App. | |
| * | |
| * Problem | |
| * create-react-app can't work with ENV_VAR for all javascript files | |
| * in public directory | |
| * on running build script. | |
| * |
const z = await navigator.serviceWorker.getRegistrations() // return array Of [ServiceWorkerRegistration]
/***
[{
active: ServiceWorker {scriptURL: "http://localhost:5000/service-worker.js", state: "activated", onerror: null, onstatechange: ƒ}
installing: null
navigationPreload: NavigationPreloadManager {}
onupdatefound: ƒ ()
paymentManager: PaymentManager {instruments: PaymentInstruments, userHint: ""}