Skip to content

Instantly share code, notes, and snippets.

Avatar
💻
Working From a Cafe

tonymtz tonymtz

💻
Working From a Cafe
View GitHub Profile
View Oh my zsh with autosuggestions & syntax-highlighting.md

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 Mar 12, 2018 — forked from tsabat/zsh.md
Getting oh-my-zsh to work in Ubuntu
View zsh.md
@tonymtz
tonymtz / gist:fce1b7847a4601a15e0cff88624398bb
Last active Dec 13, 2017 — 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/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 Mar 2, 2017 — forked from yoavniran/ultimate-ut-cheat-sheet.md
The Ultimate Unit Testing Cheat-sheet For Mocha, Chai and Sinon
View ultimate-ut-cheat-sheet.md

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 essential-javascript-links.md
View MyTimesheet.js
// 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;
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--) {