Skip to content

Instantly share code, notes, and snippets.

View nikahmadz's full-sized avatar
🔰
Senior Application Developer

Nik Ahmad Z nikahmadz

🔰
Senior Application Developer
View GitHub Profile
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) :
(global.b = factory());
}(this, (function () { 'use strict';
var popular = {
ai : 'alignItems',
b : 'bottom',
bc : 'backgroundColor',
/* @flow */
import SHA256 from 'crypto-js/sha256'
type Block = {
index: number,
previousHash: string,
timestamp: number,
data: string,
hash: string
}
@nikahmadz
nikahmadz / resources.md
Last active April 5, 2018 13:58
Travee

Gaul

Warehouse  - Cave       - Safe

 0   (800) -  1   (300) -   240
 0   (800) -  2   (390) -   312
 0   (800) -  3   (510) -   408
 0   (800) -  4   (660) -   528
 0   (800) -  5   (840) -   672
 0   (800) -  6  (1080) -   864   (800)
@nikahmadz
nikahmadz / _.helpers.md
Last active March 19, 2018 11:46
CSS helpers

CSS helpers

@nikahmadz
nikahmadz / _.scrollbars.md
Last active April 3, 2018 14:58
CSS Scrollbars

CSS Scrollbars

@nikahmadz
nikahmadz / _.spinner.md
Last active April 13, 2018 03:07
CSS Spinner

CSS Spinners

@nikahmadz
nikahmadz / config.js
Last active February 17, 2018 17:37
full firebase ui config
config={
callbacks:{
signInSuccess: function(currentUser, credential, redirectUrl) {
// Do something.
// Return type determines whether we continue the redirect automatically
// or whether we leave that to developer to handle.
return true;
},
signInFailure: function(error) {
@nikahmadz
nikahmadz / example.js
Created February 11, 2018 09:43
Never use for..in loop in Javascript
// Somewhere deep in your JavaScript library...
Array.prototype.foo = 1;
// While you have no idea that your code will misbehave.
var a = []; // Create a new empty array.
a[5] = 5; // Perfectly legal JavaScript that resizes the array.
// normal loop saves you
@nikahmadz
nikahmadz / gs.js
Created October 18, 2017 03:20
GetScript: Inject external script to a document
/*
you'll need to include supporting script like: w,d,dm,i{},ti,to,wc
they are shortcuts for: window,document,DomJs,VariableTest,Timer,and console.
*/
var
gs=function(a){
if(!io(a)||!is(a.src)){we(': Invalid source: '+a.src);return}
@nikahmadz
nikahmadz / object.property.js
Last active October 18, 2017 03:05
Object Property Utility : Set readonly property value for an object
/*
Set readonly property value for an object
*/
// Utils
var
op=function(o,p,v){
o=o||{};
var f=Object.defineProperty;
if(!io(v)){opv(v)}
if(f){