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
| # Plain Ol' Node | |
| node --max-old-space-size=1024 app.js # increase to 1gb | |
| node --max-old-space-size=2048 app.js # increase to 2gb | |
| node --max-old-space-size=3072 app.js # increase to 3gb | |
| node --max-old-space-size=4096 app.js # increase to 4gb | |
| node --max-old-space-size=5120 app.js # increase to 5gb | |
| node --max-old-space-size=6144 app.js # increase to 6gb | |
| # For pm2 | |
| pm2 start app.js --node-args="--max-old-space-size=1024" # increase to 1gb |
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
| @media (min-width:320px) { /* smartphones, portrait iPhone, portrait 480x320 phones (Android) */ } | |
| @media (min-width:480px) { /* smartphones, Android phones, landscape iPhone */ } | |
| @media (min-width:600px) { /* portrait tablets, portrait iPad, e-readers (Nook/Kindle), landscape 800x480 phones (Android) */ } | |
| @media (min-width:801px) { /* tablet, landscape iPad, lo-res laptops ands desktops */ } | |
| @media (min-width:1025px) { /* big landscape tablets, laptops, and desktops */ } | |
| @media (min-width:1281px) { /* hi-res laptops and desktops */ } | |
| /* ----------- iPhone 4 and 4S ----------- */ | |
| /* Portrait and Landscape */ |
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
| # | |
| # Sources: | |
| # http://stackoverflow.com/questions/7704624/how-can-i-use-gzip-compression-for-css-and-js-files-on-my-websites | |
| # http://codex.wordpress.org/Output_Compression | |
| # http://www.perun.net/2009/06/06/wordpress-websites-beschleuinigen-4-ein-zwischenergebnis/#comment-61086 | |
| # http://www.smashingmagazine.com/smashing-book-1/performance-optimization-for-websites-part-2-of-2/ | |
| # http://gtmetrix.com/configure-entity-tags-etags.html | |
| # http://de.slideshare.net/walterebert/die-htaccessrichtignutzenwchh2014 | |
| # http://de.slideshare.net/walterebert/mehr-performance-fr-wordpress | |
| # |
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
| MAIL_SERVER = '' | |
| USERNAME = '' | |
| PASSWORD = '' | |
| MAILBOX = 'Spam' | |
| MAX_DAYS = 7 # Deletes messages older than a week | |
| import imaplib | |
| import datetime | |
| today = datetime.date.today() |
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
| //PhantomJS http://phantomjs.org/ based web crawler Anton Ivanov anton.al.ivanov@gmail.com 2012 | |
| //UPDATE: This gist has been made into a Node.js module and now can be installed with "npm install js-crawler" | |
| //the Node.js version does not use Phantom.JS, but the API available to the client is similar to the present gist | |
| (function(host) { | |
| function Crawler() { | |
| this.visitedURLs = {}; | |
| }; | |
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
| # Relevant example from our monitrc file. | |
| check process couchdb with pidfile /usr/local/var/run/couchdb/couchdb.pid | |
| start program = "/etc/init.d/couchdb start" | |
| stop program = "/etc/init.d/couchdb stop" | |
| if cpu > 60% for 2 cycles then alert | |
| if cpu > 80% for 5 cycles then restart | |
| if memory usage > 70% MB for 5 cycles then restart |
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
| #301 Redirects for .htaccess | |
| #Redirect a single page: | |
| Redirect 301 /pagename.php http://www.domain.com/pagename.html | |
| #Redirect an entire site: | |
| Redirect 301 / http://www.domain.com/ | |
| #Redirect an entire site to a sub folder | |
| Redirect 301 / http://www.domain.com/subfolder/ |
NewerOlder