If you are using Gulp for you workflow, there might be chance when you have some error, gulp will stop, and you rerun gulp again, wow thats really kills your productivity, especially sometime you don’t see the reflection on your browser and you seems can’t figure out whats wrong until you go check your terminal.
there is a gulp plugin called gulp-plumber helps when you do not want to break your gulp and print the error on console.
its really easy, just install and include in your gulp pipe like this.
First, install gulp-plumber as a development dependency:
npm install --save-dev gulp-plumber
Then, add it to you gulpfile.js:
var plumber = require('gulp-plumber');
var coffee = require('gulp-coffee');
for those who faced problem with gulp when watching a big number of files.
error might looks like this:
throw errnoException(process._errno, 'spawn');
Error: spawn EMFILE
at errnoException (child_process.js:988:11)
at ChildProcess.spawn (child_process.js:935:11)
here is a solution for you, the reason that caused this problem is by default mac is using 256 as default number of opening files, so set the limit to a large number will fix this problem
on your terminal
ulimit -S -n 2048 # or whatever number you choose
anyway if you are not familiar with Gulp, check out this page:
For those who have a macbook pro and raspberry pi and you do not want to use a new keyboard and monitor or mouse, you can use your macbook pro to access your raspberry pi even with screen share.
first you need to connect your raspberry pi with ethernet and USB power adaptor. which like my photo bellow the yellow as the ethernet and black as the power adaptor.
once you are connected it will automatic startup your raspberry pi, and now you can access it by ssh, well before that make sure you share your ethernet connection.
For those who are having problem with mysql command in terminal,
if you are getting an error message when you type mysql in command after you installed MAMP on mac,
Can’t connect to local MySQL server through socket ‘/tmp/mysql.sock’ (2)
The solution is easy,
go to your terminal,
sudo nano /etc/my.cnf
and paste in this line..
click command O to save the file and command X to exit, restart your MAMP and there you go!
Here is a guide on how you can make your applications into stacks on your dock.
First go to your application folder, create a new folder by clicking setting icon on the finder menu.
Tips of the day, when you are doing development for some website and sometime you found that Chome cached your image or some scripts and made you always need to clear cache in order to reflect your changes.
A quick way yo clear cache is pressing and hold “Shift” and click refresh on your browser.
sometime the cache is too strong and the quick clearing cache method will not work, so the best way to do this is to stop cache of the site that you are working on.
Continue reading “Clear Cache on chrome”