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

Oh my zsh.

Install with curl

sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

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

  • Download zsh-autosuggestions by
@tonymtz
tonymtz / zsh.md
Created March 12, 2018 00:06 — forked from tsabat/zsh.md
Getting oh-my-zsh to work in Ubuntu
@tonymtz
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.
  1. Digital Ocean console web access. [Important]
  2. cp ~/.ssh/id_rsa.pub ~/key.txt
  3. Dropbox it.
  4. Generate a public share link in dropbox
  5. Get something like this: https://www.dropbox.com/s/{{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
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


// 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;
[
{
"keys": ["shift+f11"],
"command": "toggle_menu"
},
{
"keys": ["ctrl+f11"],
"command": "toggle_side_bar"
},
]
// 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--) {