Can check if you're using swap with sudo swapon --show and free -h.
Useful for t2.micro and other instances with no access to instance store. Use this if you prefer not to mess with the root volume.
- Create the EBS volume e.g., 1 GB.
| wget https://curl.haxx.se/download/curl-7.50.0.tar.gz | |
| tar -zxvf curl-7.50.0.tar.gz | |
| cd curl-7.50.0/ | |
| sudo apt install libc-ares-dev | |
| sudo apt-get install libc-ares-dev | |
| openssl version # check | |
| ./configure --with-ssl=/usr/local/ssl --enable-ares | |
| make | |
| sudo make install | |
| curl --version |
| sudo pip install awscli | |
| aws configure | |
| aws ses send-email \ | |
| --from "john@gmail.com" \ | |
| --destination "ToAddresses=mike@gmail.com" \ | |
| --message "Subject={Data=from ses,Charset=utf8},Body={Text={Data=ses says hi,Charset=utf8},Html={Data=,Charset=utf8}}" |
| // request('GET',url) | |
| // .then(console.log.bind(console)) | |
| // .catch(console.error.bind(console)); | |
| var request = function (verb,url,data) { | |
| return new Promise(function (resolve,reject) { | |
| var stateChange = function (xhr) { | |
| request = xhr.target; |
| REM On Unix you would do this: find ./ -type f -exec dos2unix {} \; | |
| REM After installing dos2unix.exe in Windows, you can create a small bat script with the below in it to | |
| REM recursively change the line endings. Careful if you have any hidden directories (e.g. .git) | |
| for /f "tokens=* delims=" %%a in ('dir "C:\Users\username\path\to\directory" /s /b') do ( | |
| "C:\Program Files\unix2dos.exe" %%a | |
| ) |
| # | |
| # Name: nginx-tls.conf | |
| # Auth: Gavin Lloyd <gavinhungry@gmail.com> | |
| # Desc: Nginx SSL/TLS configuration for "A+" Qualys SSL Labs rating | |
| # | |
| # Enables HTTP/2, PFS, HSTS and OCSP stapling. Configuration options not related | |
| # to SSL/TLS are not included here. | |
| # | |
| # Additional tips: | |
| # |
My typical setup for a development box in VirtualBox uses two NICs. The first uses NAT to allow the box to communicate with the outside world through my host computer’s network connection. (NAT is the default, so shouldn't require any setup.) The second is a "host-only" connection that allows my host and guest to interact.
To create a host-only connection in VirtualBox, start by opening the preferences in VirtualBox. Go to the "Network" tab, and addd a Host-only Network. Modify the host-only network, and disable DHCP. Make a note of the IP address. (Feel free to set the IP address as well, if you like.)
Next, assign this host-only adapter to the virtual machine. Select the VM and press "Settings". Go to the "Network" tab, and select "Adpater 2". Enable the adapter, set it to a "Host-only Adapter", and select the adpater you created above.
| ;(function ($, window) { | |
| var intervals = {}; | |
| var removeListener = function(selector) { | |
| if (intervals[selector]) { | |
| window.clearInterval(intervals[selector]); | |
| intervals[selector] = null; | |
| } |