start new:
tmux
start new with session name:
tmux new -s myname
| Connect to your Mac's localhost from within a VMWare virtual machine. | |
| - Boot up VMware and fire up your VM (i'm using Windows 7) | |
| - Make sure that the VM is using NAT | |
| - Fire up the command prompt in Windows and type "ipconfig". IN the resulting text look for your IPv4 address. It will be something like 192.168.xxx.xxx | |
| - Now go to your browser in your VM and type that ip address into the url bar but change the last set of digits to be 2 (or 1). | |
| - so as an example if your ip was found to be 192.168.213.200 change it to be 192.168.213.2 | |
| - Assuming that your localhost is running on your mac you should get your localhost in your VM browser. | |
| - If you need to add a non standard port number on the end like 8090 go ahead and do so. |
| /** | |
| * npm install jsdom | |
| * npm install jquery | |
| */ | |
| var html = "<!doctype html><html><body><h1>Hello world!</h1></body></html>"; | |
| /* parse the html and create a dom window */ | |
| var window = require('jsdom').jsdom(html, null, { | |
| // standard options: disable loading other assets |
| /* | |
| NOTE!!!! | |
| The most updated version of this code is here: | |
| https://github.com/scottjehl/iOS-Orientationchange-Fix |
| var parser = document.createElement('a'); | |
| parser.href = "http://example.com:3000/pathname/?search=test#hash"; | |
| parser.protocol; // => "http:" | |
| parser.hostname; // => "example.com" | |
| parser.port; // => "3000" | |
| parser.pathname; // => "/pathname/" | |
| parser.search; // => "?search=test" | |
| parser.hash; // => "#hash" | |
| parser.host; // => "example.com:3000" |
| /usr/libexec/PlistBuddy -c 'Add :LSUIElement bool true' /Applications/iTerm.app/Contents/Info.plist |
| # to generate your dhparam.pem file, run in the terminal | |
| openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 |
| # remove | |
| /usr/libexec/PlistBuddy -c 'Add :LSUIElement bool true' /Applications/iTerm.app/Contents/Info.plist | |
| # restore | |
| /usr/libexec/PlistBuddy -c 'Delete :LSUIElement' /Applications/iTerm.app/Contents/Info.plist |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.