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
[ | |
{ | |
"keys": ["shift+f11"], | |
"command": "toggle_menu" | |
}, | |
{ | |
"keys": ["ctrl+f11"], | |
"command": "toggle_side_bar" | |
}, | |
] |
// Author: Jorge Garcia Miguel | |
// Script to get tp numbers from Target Process. | |
// | |
// INSTRUCTIONS: | |
// | |
// Copy and paste this script on web developer tools console and enjoy!. | |
(function () { | |
var storiesOrBugs = [], | |
tp = null; |
#!/usr/bin/env sh | |
# for golang | |
# mkdir $HOME/go | |
# mkdir -p $GOPATH/src/github.com/user | |
export GOPATH=$HOME/go | |
export PATH=$PATH:$GOPATH/bin | |
brew update && brew upgrade | |
brew install go |
git config --global user.name {USERID} | |
git config --global user.email {USERID@domain.tld} | |
git config --global branch.autosetuprebase always | |
git config --global push.default tracking |
#!/bin/sh | |
function abort { | |
echo "$1" | |
exit 1 | |
} | |
set -e | |
/usr/bin/which -s git || abort "brew install git first!" |
// encode(decode) html text into html entity | |
var decodeHtmlEntity = function(str) { | |
return str.replace(/&#(\d+);/g, function(match, dec) { | |
return String.fromCharCode(dec); | |
}); | |
}; | |
var encodeHtmlEntity = function(str) { | |
var buf = []; | |
for (var i=str.length-1;i>=0;i--) { |
public class MySingleton : MonoBehaviour | |
{ | |
private static MySingleton instance; | |
public static MySingleton Instance | |
{ | |
get | |
{ | |
if (instance == null) | |
{ |
using Unity.Engine; | |
using Tobii.EyeTracking; | |
public class ExampleClass : MonoBehaviour | |
{ | |
void Update() | |
{ | |
GazePoint gazePoint = EyeTracking.GetGazePoint(); | |
if (gazePoint.IsValid) | |
{ |
using mocha/chai/sinon for node.js unit-tests? check out my utility: mocha-stirrer to easily reuse test components and mock require dependencies
// Insert this next line on Preferences > Sidebar > Customize your theme and share it with others. | |
#2D363F,#485058,#B20D0F,#FFFFFF,#485058,#FFFFFF,#B20D0F,#B20D0F |