- http://www.errorify.com/ - source maps
- http://errorception.com/ - translate error messages to English
- http://www.exceptionhub.com/
- http://jserrlog.appspot.com/
- http://www.muscula.com/ - source maps, translate error messages to English
- https://www.airbrake.io/ - tracekit, source maps
- http://www.errorstack.com/
This file contains 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
To enable window.gc() on Chrome browser console you just need to start Chrome like this: | |
> /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --js-flags="--expose-gc" --enable-memory-info | |
Those flags enable the following console API, very usefull to debug memory leaks: | |
> console.memory // print memory information | |
> window.gc() // force garbage collection |
Prereq:
apt-get install zsh
apt-get install git-core
Getting zsh to work in ubuntu is weird, since sh
does not understand the source
command. So, you do this to install zsh
wget https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | zsh
This file contains 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
# memory and map uses to limit memory on slall instances | |
convert -limit memory 32 -limit map 64 input.tif -units PixelsPerInch -density 72 -quality 80 -resize 1024 output.jpg |
This file contains 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
sudo apt-get update | |
sudo apt-get install build-essential checkinstall libx11-dev libxext-dev zlib1g-dev libpng12-dev libjpeg-dev libfreetype6-dev libxml2-dev | |
sudo apt-get install imagemagick | |
wget http://www.imagemagick.org/download/ImageMagick.tar.gz | |
tar -xzvf ImageMagick.tar.gz | |
cd ImageMagick-6.8.9-9 | |
./configure | |
make | |
sudo make install |
This file contains 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
var query = { user: ObjectId("54ef43552e90860000000001"), trashed: { $ne: true } }; | |
function map(){ | |
if(this.tags && this.tags.length) { | |
var emits = []; // store all future emits. we will unique it later | |
for(var i=0; i<this.tags.length;i++){ | |
var tag = this.tags[i]; | |
var path = tag.path; | |
while(path.length){ |
This file contains 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
```identify -verbose file.jpg | grep Interlace``` | |
///If you get back Interlace: JPEG then it’s progressive. It you get back Interlace: None then it’s a baseline (i.e. non-progressive JPEG). |
This file contains 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 script will boot app.js with the number of workers | |
// specified in WORKER_COUNT. | |
// | |
// The master will respond to SIGHUP, which will trigger | |
// restarting all the workers and reloading the app. | |
var cluster = require('cluster'); | |
var workerCount = process.env.WORKER_COUNT || 2; | |
// Defines what each worker needs to run |
I use Namecheap.com as a registrar, and they resale SSL Certs from a number of other companies, including Comodo.
These are the steps I went through to set up an SSL cert.
This file contains 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
function get_avatar_from_service(service, userid, size) { | |
// this return the url that redirects to the according user image/avatar/profile picture | |
// implemented services: google profiles, facebook, gravatar, twitter, tumblr, default fallback | |
// for google use get_avatar_from_service('google', profile-name or user-id , size-in-px ) | |
// for facebook use get_avatar_from_service('facebook', vanity url or user-id , size-in-px or size-as-word ) | |
// for gravatar use get_avatar_from_service('gravatar', md5 hash email@adress, size-in-px ) | |
// for twitter use get_avatar_from_service('twitter', username, size-in-px or size-as-word ) | |
// for tumblr use get_avatar_from_service('tumblr', blog-url, size-in-px ) | |
// everything else will go to the fallback | |
// google and gravatar scale the avatar to any site, others will guided to the next best version |