Skip to content

Instantly share code, notes, and snippets.

Working From a Cafe

tonymtz tonymtz

Working From a Cafe
View GitHub Profile
View Oh my zsh with autosuggestions &

Oh my zsh.

Install with curl

sh -c "$(curl -fsSL"

Enabling Plugins (zsh-autosuggestions & zsh-syntax-highlighting)

  • Download zsh-autosuggestions by
tonymtz /
Created March 12, 2018 00:06 — forked from tsabat/
Getting oh-my-zsh to work in Ubuntu
tonymtz / gist:fce1b7847a4601a15e0cff88624398bb
Last active December 13, 2017 23:34 — forked from jmsalcido/gist:c4530e4eeae9df0a39bad3e3dbe17db6
What to do when your ssh key is deleted from Digital Ocean and you have only SSH access with password.
View gist:fce1b7847a4601a15e0cff88624398bb
  1. Digital Ocean console web access. [Important]
  2. cp ~/.ssh/ ~/key.txt
  3. Dropbox it.
  4. Generate a public share link in dropbox
  5. Get something like this:{{id}}/file?dl=0
  6. Replace the 0 to 1
  7. Get on Digital Ocean web console
  8. WGET it.
  9. Append it to $HOME/.ssh/authorized_keys cat $HOME/key.txt >> $HOME/.ssh/authorized_keys
  10. be happy
tonymtz /
Created March 2, 2017 22:10 — forked from yoavniran/
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

View MyTimesheet.js
// Author: Jorge Garcia Miguel
// Script to get tp numbers from Target Process.
// Copy and paste this script on web developer tools console and enjoy!.
(function () {
var storiesOrBugs = [],
tp = null;
View Default(Linux).sublime-keymap
"keys": ["shift+f11"],
"command": "toggle_menu"
"keys": ["ctrl+f11"],
"command": "toggle_side_bar"
View htmlentity.js
// 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--) {