using mocha/chai/sinon for node.js unit-tests? check out my utility: mocha-stirrer to easily reuse test components and mock require dependencies
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
# 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 # | |
#---------------------------------# |
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
@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 |
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
[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 |
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
// ==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 |
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
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()); | |
} |
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
// 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); |
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
function ReloadPlugin() {} | |
ReloadPlugin.prototype.apply = compiler => { | |
ReloadPlugin.watching = false | |
compiler.plugin('watch-run', (p, cb) => { | |
ReloadPlugin.watching = true | |
cb() | |
}) |
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.
Create a React app.
Put the script into scripts/watch.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
// Initial idea of commit | |
// js | |
/* | |
var enableResetButton = function() { | |
if (reset.disabled) { | |
reset.disabled = false | |
} | |
else reset.disabled = true | |
} |
OlderNewer