This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Uses [request](https://github.com/mikeal/request) | |
// /?url=http://nodejs.org/logo.png | |
// /?uri=http://nodejs.org/logo.png | |
// /?url=http://nodejs.org/logo.png&cb=cbName | |
// /?url=http://nodejs.org/logo.png&callback=cbName | |
var fs = require('fs'); | |
var url = require('url'); | |
var http = require('http'); | |
var request = require('request'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This will open up a prompt for text to send to a console session on digital ocean | |
// Useful for long passwords | |
(function () { | |
var t = prompt("Enter text to be sent to console, (This wont send the enter keystroke)").split(""); | |
function f() { | |
var character = t.shift(); | |
var i=[]; | |
var code = character.charCodeAt(); | |
var needs_shift = "!@#$%^&*()_+{}:\"<>?~|".indexOf(character) !== -1 |
in OS X 10.4 to macOS sierra 10.12 and maybe higher!
Copy this entire code block and paste it into your terminal and push Return to create this file for you with correct permissions. It will (probably) ask for your password:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
On iTerm2 - Open Preferences > Profiles > Keys > Key Mappings > Presets > Select Natural Text Editing | |
- You can move a word backwards using Option ⌥ + ← and a word forwards using Option ⌥ + → | |
- Move to the start of the line using fn + ← and to the end of the line with fn + →. | |
- Also you can delete a word backwards using Option ⌥ + ⌫, delete the whole line using Command ⌘ + ⌫. | |
If the preset doesn't appear, reinstall iTerm2. If you installed it using Homebrew + Cask: | |
brew cask reinstall iterm2 |