Skip to content

Instantly share code, notes, and snippets.

View kukiron's full-sized avatar
🚀
I do stuff...

Kafil Uddin Kiron kukiron

🚀
I do stuff...
View GitHub Profile
@kukiron
kukiron / appveyor.yml
Created July 7, 2017 03:13
appveyor.yml reference
# Notes:
# - Minimal appveyor.yml file is an empty file. All sections are optional.
# - Indent each level of configuration with 2 spaces. Do not use tabs!
# - All section names are case-sensitive.
# - Section names should be unique on each level.
#---------------------------------#
# general configuration #
#---------------------------------#
@kukiron
kukiron / OpenWithSublimeText3
Created July 22, 2017 15:43
Open folders and files with Sublime Text 3 from windows explorer context menu (tested in Windows 10)
@echo off
SET st3_path=C:\Program Files\Sublime Text 3\sublime_text.exe
SET st3_label=Open with Sublime_Text
rem add it for all file types
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3" /t REG_SZ /v "" /d "%st3_label%" /f
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3" /t REG_EXPAND_SZ /v "Icon" /d "%st3_path%,0" /f
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3\command" /t REG_SZ /v "" /d "%st3_path% \"%%1\"" /f
rem add it for folders
@kukiron
kukiron / git-aliases
Created August 3, 2017 18:43
List of Git Aliases in .bashrc
[alias]
# one-line log
l = log --pretty=format:"%C(yellow)%h\\ %ad%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --date=short
a = add
ap = add -p
c = commit --verbose
ca = commit -a --verbose
cm = commit -m
cam = commit -a -m
@kukiron
kukiron / github-dark-script.user.js
Created August 14, 2017 22:48
Dark theme script for GitHub using TamperMonkey
// ==UserScript==
// @name GitHub Dark Script
// @version 2.2.5
// @description GitHub Dark in userscript form, with a settings panel
// @license MIT
// @author StylishThemes
// @namespace https://github.com/StylishThemes
// @include /^https?://((gist|guides|help|raw|status|developer)\.)?github\.com((?!generated_pages\/preview).)*$/
// @include /^https://*.githubusercontent.com/*$/
// @run-at document-start
@kukiron
kukiron / ultimate-ut-cheat-sheet.md
Created August 21, 2017 04:16 — forked from yoavniran/ultimate-ut-cheat-sheet.md
The Ultimate Unit Testing Cheat-sheet For Mocha, Chai and Sinon

The Ultimate Unit Testing Cheat-sheet

For Mocha, Chai and Sinon

using mocha/chai/sinon for node.js unit-tests? check out my utility: mocha-stirrer to easily reuse test components and mock require dependencies


@kukiron
kukiron / deepClone.js
Last active August 28, 2017 16:03
Deep Cloning JavaScript Objects
function deepClone(obj){
// in case of premitives
if(obj===null || typeof obj !== "object"){
return obj;
}
// handle date objects
if(obj instanceof Date){
return new Date(obj.getTime());
}
@kukiron
kukiron / invitations.js
Last active August 28, 2017 15:51
Find out the list of business partners with offices within 100km
// data is referred to as the list of partners in JSON
var addressesList,
addresses,
coordsList,
coords,
distance;
addressesList = data.map(item => item.offices.map(el => el.address));
addresses = [].concat.apply([], addressesList);
@kukiron
kukiron / ReloadPlugin.js
Created August 31, 2017 09:52 — forked from timdorr/ReloadPlugin.js
Webpack Chrome Extension Page Reloader Plugin
function ReloadPlugin() {}
ReloadPlugin.prototype.apply = compiler => {
ReloadPlugin.watching = false
compiler.plugin('watch-run', (p, cb) => {
ReloadPlugin.watching = true
cb()
})
@kukiron
kukiron / README.md
Created September 10, 2017 13:19 — forked from int128/README.md
Watching build mode on Create React App

Create React App does not provide watching build mode oficially (#1070).

This script provides watching build mode for an external tool such as Chrome Extensions or Firebase app.

How to Use

Create a React app.

Put the script into scripts/watch.js.

@kukiron
kukiron / example.js
Last active September 11, 2017 03:25
Rythm.js commit & possible changes
// Initial idea of commit
// js
/*
var enableResetButton = function() {
if (reset.disabled) {
reset.disabled = false
}
else reset.disabled = true
}