Warnings on running phpcs -i for SublimeLinter

Warning: include_once(PHP/CodeSniffer/CLI.php): failed to open stream: No such file or directory in /usr/bin/phpcs on line 31

Warning: include_once(): Failed opening ‘PHP/CodeSniffer/CLI.php’ for inclusion (include_path=’.:’) in /usr/bin/phpcs on line 31 Continue reading “Warnings on running phpcs -i for SublimeLinter”

gcc-4.8: error: unrecognized command line option ‘-fnested-functions’

Tried to install phplinter by running the command brew install homebrew/php/phplint for sublime text and this error came up:
gcc-4.8: error: unrecognized command line option ‘-fnested-functionsContinue reading “gcc-4.8: error: unrecognized command line option ‘-fnested-functions’”

Recovering admin password in drupal 7 from phpmyadmin

Just head in phpmyadmin and find the table ‘users’. Then find user 1 and change the password with the value ‘$S$Drl0vgZ9yuU9uc4JyaTMHxMPriC7q/PsOUOx52fCrVQSTpI/Tu4x’ which is the encrypted value for the password ‘drupal’.

Want to do it from shell? No problem. Just type:
UPDATE users SET name='admin', pass='$S$Drl0vgZ9yuU9uc4JyaTMHxMPriC7q/PsOUOx52fCrVQSTpI/Tu4x' WHERE uid = 1;

Do you still have Drupal 6? OMG! Are you serious? You have to update immediately! But to update your system just type:
UPDATE users SET name='admin', pass=md5('drupal') WHERE uid = 1;
…in order to revoke your password.

ERROR: ASCII ‘\0’ appeared in the statement, but this is not allowed unless option…

ERROR: ASCII ‘\0’ appeared in the statement, but this is not allowed unless option –binary-mode is enabled and mysql is run in non-interactive mode. Set –binary-mode to 1 if ASCII ‘\0’ is expected. Query: 

Continue reading “ERROR: ASCII ‘\0’ appeared in the statement, but this is not allowed unless option…”

How to start ghost on CentOS automatically

CentOS init script for the ghost blogging platform

There are actually 4 ways to automatically start ghost automatically.

Some prefer “forever”, take a look here http://blog.nodejitsu.com/keep-a-nodejs-server-up-with-forever/ Continue reading “How to start ghost on CentOS automatically”

How to add an XML sitemap of your ghost blog to Google webmaster tools

Well, actually you can’t do it easily without messing around with shell scripts.

But there is a simple way to get crawled. Just use the address my-blog.com/rss where “my-blog” is actually your blog’s URL, and put it as a new sitemap. Continue reading “How to add an XML sitemap of your ghost blog to Google webmaster tools”

after installing sass beautify I get this error…

Trying to install sass beautify on Sublime Text and get this error?

/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/dependency.rb:296:in ‘to_specs’: Could not find ‘sass’ (>= 0) among 12 total gem(s) (Gem::LoadError)

Come on!! Are you serious?? Just type:
sudo gem install sass