A Pen by Peramanathan on CodePen.
Standard practices say no non-root process gets to talk to the Internet on a port less than 1024. How, then, could I get Node talking on port 80 on EC2? (I wanted it to go as fast as possible and use the smallest possible share of my teeny tiny little micro-instance's resources, so proxying through nginx or Apache seemed suboptimal.)
Alter the port the script talks to from 8000 to 80:
}).listen(80);
curl -H 'Authorization: token INSERTACCESSTOKENHERE' -H 'Accept: application/vnd.github.v3.raw' -O -L https://api.github.com/repos/owner/repo/contents/path |
These are my notes basically. At first i created this gist just as a reminder for myself. But feel free to use this for your project as a starting point. If you have questions you can find me on twitter @thomasf https://twitter.com/thomasf This is how i used it on a Debian Wheezy testing (https://www.debian.org/releases/testing/)
Discuss, ask questions, etc. here https://news.ycombinator.com/item?id=7445545
/** | |
* This source file is free software, under the GPL v2 license: | |
* http://www.gnu.org/licenses/gpl-2.0.html | |
*/ | |
(function(a,b){typeof VisualEvent_Loader=="undefined"&&(a.VisualEvent_Loader=function(){if(!this instanceof VisualEvent_Loader){alert("VisualEvent loader warning: Must be initialised with the 'new' keyword.");return}this.s={loadingComplete:!1},this.dom={loading:b.createElement("div")},this._construct()},VisualEvent_Loader.prototype={_construct:function(){var c=this,d,e,f=a.location.protocol==="file:"?"http:":"";if(this.s.loadingComplete===!0)return 0;d=this.dom.loading,d.setAttribute("id","EventLoading"),d.appendChild(b.createTextNode("Loading Visual Event...")),e=d.style,e.position="fixed",e.bottom="0",e.left="0",e.color="white",e.padding="5px 10px",e.fontSize="11px",e.fontFamily='"Lucida Grande", Verdana, Arial, Helvetica, sans-serif',e.zIndex="55999",e.backgroundColor="#93a8cf",b.body.insertBefore(d,b.body.childNodes[0]),VisualEvent_Loader.jQueryPreLoaded=typeof jQuery=="undefined"?!1:!0;if |
We are installing Pillow forked from PIL (as it is compatible with setuptools)
pip install pillow
- Navigate to any folder contains images of type JPEG
- Download by Right-click and
save as
resize_image.py
OR
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
hdiutil convert -format UDRW -o ubuntu-14.04.4-desktop-amd64.img ubuntu-14.04.4-desktop-amd64.iso | |
mv ubuntu-14.04.4-desktop-amd64.img.dmg ubuntu-14.04.4-desktop-amd64.img |
Related Setup: https://gist.github.com/hofmannsven/6814278
Related Pro Tips: https://ochronus.com/git-tips-from-the-trenches/