Gulp error tracking

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');

gulp.src('./src/*.ext').pipe(plumber())
.pipe(coffee())
.pipe(gulp.dest('./dist'));

Update your hosts for wordpress on digitalocrean

Any one facing problem with digital ocean sending email?

the solution is easy, login to your ssh, and open up hosts file
[cc lang=”php”]nano /etc/hosts

change your host to something like this 127.0.0.1 localhost.localdomain localhost yourhostname and restart your services. and boom, you see your email send instantly.

Remove wordpress asking for FTP

There are many time wordpress has this annoying thing asking for FTP username and password when you try to install the plugins or themes..

here is a simple way give direct access to the file systems.

Paste the following line in your wp-config.php 

define( ‘FS_METHOD’, ‘direct’);

Sync local files and folder to remote

Working in a team project which uses VPN as a virual host where you will see your own changes or can be viewed by team members, however everytime someone made a change and you need to pull from GIT or other Version Control tools, you need to send these changes to the remote server, here is how I automated my process, or at least reduce the process, I am using sublime as my IDE, most people recommend PHP Storm for our project, however I just like to stay with sublime for their lightweight and packages, I installed SFTP for sublime which comes with a trial of 30 days, or you can pay after that for $20 bucks, SFTP allow me to sync local files and folder to remote or remote to local, or two ways sync.

There is a settings that I love alot is the

[cc lang=”php”]”upload_on_save”: true

Once you click save, the file will be automatically send to remote, and there are so much settings you can do with SFTP sublime.

Just check official Usage page.

http://wbond.net/sublime_packages/sftp/usage

However!!! It does not watch my folder, when I do a Git pull, there are so much files downloaded and files changes, the bad thing is SFTP does not watch that for me and upload these changes to remote.
Continue reading “Sync local files and folder to remote”

Hands on Atom Editor

Today I have got invited to test out the new Atom Editor by Github, here is my experience with the editor.

The first thing when I open up the editor is open up some files, too bad first start does not allow me to do that, however there is a cool function by Atom, Atom comes with an command option in terminal to open up current folder. You can open your project by using

atom open

Gulp Mamp development

I am doing quite a lot of wordpress stuff and since using Gulp, i found happiness in my development environment, here are the most common modules that I used.

  • tiny-lr
  • gulp-coffee
  • gulp-sass
  • gulp-uglify
  • gulp-jshint
  • gulp-util
  • gulp-livereload
  • gulp-imagemin

So what I want to do with my wordpress development is that every time I made some changes to SASS / CoffeeScript or even when I saved the image it will reload the page automatically.

Continue reading “Gulp Mamp development”

Generate md5hash in mac terminal

Most of the time you need to generate a md5hash password for your mysql or any other purpose, you go to some md5hash generator website, but thats just wasting of time, and thanks to openssl you can generate using your terminal

echo -n “string that you want to convert” | openssl md5

Themeing in Ghost blogging platform

Once you installed Ghost in my previous post guide, open up the ghost folder location, you will see a folder name “themes” in ghost/content/themes there is where contains all themes in your ghost app which is similar to wordpress which is wordpress/wp-content/themes/themeName.

Go ahead copy the default theme casper and paste with any name you like,
either keep or delete the 2 text files which is the LICENSE.txt and README.md (by the way if you need visual Markdown editor check out my previous post on Mou)
As you can see there are 3 main files and a assets folder here for now,
  • assets(Folder)
  • default.hbs
  • index.hbs
  • post.hbs

Introducing Mou markdown GUI editor

Recently I found an awesome app for markdown editing visually called Mou, still in beta when I am writing this article, but has got all the features that I need(more than what I need), anyway once you download from its official website, http://mouapp.com/, open up, as see from my screenshot below, it comes with 2 column layout, very simple very beautiful yet powerful, on the left side where you write the markdown syntax and right side is the live visual. 

Of course if you are not familiar with markdown syntax, you can quickly get a cheat sheet from https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet. However something you would like the ability of click and choose styles or insert images etc, currently Mou come with these features by either choosing Action the menu panel or you can see the shortcuts that they provided when you click action

I have to say its more than what we need as a markdown editor, there is one feature that I would suggest is to have right click and choose action which is lack in the editor, other than that it perfect.