Skip to content

Instantly share code, notes, and snippets.

View tonymtz's full-sized avatar
💻
Working From a Cafe

tonymtz tonymtz

💻
Working From a Cafe
View GitHub Profile
[
{
"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;
@tonymtz
tonymtz / install.sh
Created November 28, 2014 04:25
Installing GoLang
#!/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
@tonymtz
tonymtz / git.sh
Created April 4, 2015 23:07
Git Configuration
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
@tonymtz
tonymtz / uninstall_homebrew.sh
Created November 15, 2014 00:03
Uninstall Homebrew from OSX Yosemite
#!/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--) {
@tonymtz
tonymtz / MySingleton.cs
Created October 3, 2016 01:31
Singleton Unity C#
public class MySingleton : MonoBehaviour
{
private static MySingleton instance;
public static MySingleton Instance
{
get
{
if (instance == null)
{
@tonymtz
tonymtz / ExampleClass.cs
Created January 19, 2017 04:06
EyeTracking.GetGazePoint sample
using Unity.Engine;
using Tobii.EyeTracking;
public class ExampleClass : MonoBehaviour
{
void Update()
{
GazePoint gazePoint = EyeTracking.GetGazePoint();
if (gazePoint.IsValid)
{
@tonymtz
tonymtz / ultimate-ut-cheat-sheet.md
Created March 2, 2017 22:10 — 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


// Insert this next line on Preferences > Sidebar > Customize your theme and share it with others.
#2D363F,#485058,#B20D0F,#FFFFFF,#485058,#FFFFFF,#B20D0F,#B20D0F