Month: August 2011

Modify Jquery Typing disable enter key / some key from start event

Modify Jquery Typing disable enter key / some key from start event

I have chat applications based on NodeJS that using Jquery-typing for detecting user activity. This plugin is great, but i facing some problem with enter keys. I make some script if user press “ENTER”, it will send message. But seems Jquery-typing detect “ENTER” key as start typing activity. It will make my chat application give …

+ Read More

How to remove upstream remote repository in Github

How to remove upstream remote repository in Github

When you forking repository, you usually add stream to enable push your changes into origin master. Adding stream to remote repository by : 1git remote add upstream git://github.com/octocat/Spoon-Knife.git But how to remove upstream if we use wrong github repository. Adding again will throw error “fatal: remote upstream already exists”, for example like this: 1fatal: ‘git//github.com/narfdotpl/jquery-typing.git’ …

+ Read More

Auto checking errors for Javascript in VIM using JavascriptLint

Auto checking errors for Javascript in VIM using JavascriptLint

I have edited a lot of javascript files in VIM. Checking errors in a lot of javascripts line is such a pain till i found JavasriptLint + VIM Plugin. Let get started, i use Ubuntu Natty 11.04 on this installation. Updated! You can fork it on Github : Davepacheco’s javascriptlint Github 1. Install JavascriptLint 123456cd …

+ Read More

Solving Snipmate vim error Snippet c) is already defined

Solving Snipmate vim error Snippet c) is already defined

Today i get these errors after forking my github : 1234567891011121314151617Warning in snipMate.vim: Snippet c) is already defined. See :h multi_snip for help on snippets with multiple matches. Warning in snipMate.vim: Snippet date is already defined. See :h multi_snip for help on snippets with multiple matches. Warning in snipMate.vim: Snippet ddate is already defined. See …

+ Read More

Hot tips collection about using VIM

Hot tips collection about using VIM

Today i try to learn VIM and found several trivial things that probably gain my effectivity about using VIM. Note that i use VIM for editing PHP, Python, Javascript, CSS and HTML. Also i create my own VIM like Netbeans ( Which it’s still my primary IDE for web development ) in http://github.com/yodiaditya/vim-netbeans. Here are …

+ Read More

How to solve tmp/cache/ is not writable [CORE/cake/libs/cache/file.php, line 267] app/tmp/cache/persistent/ is not writable [CORE/cake/libs/cache/ file.php, line 267]

How to solve tmp/cache/ is not writable [CORE/cake/libs/cache/file.php, line 267] app/tmp/cache/persistent/ is not writable [CORE/cake/libs/cache/ file.php, line 267]

Today i got this kind of error in my CakePHP 1.3. Here are the error code : 1tmp/cache/ is not writable [CORE/cake/libs/cache/file.php, line 267] app/tmp/cache/persistent/ is not writable [CORE/cake/libs/cache/ file.php, line 267] I tried to solve this by chmod and change permisssion recursive into app/tmp. 12cd app/ chmod 777 -R tmp Hey, after change permission, …

+ Read More

How to fix memcached problem in WordPress 3

How to fix memcached problem in WordPress 3

When using memcached plugin in WordPress 3 and multiple sites used same memcached server, all sites seems have wrong redirection. Thought it was my firefox cache problem but it doesn’t. This is because bug in object-cache.php. Mohanjit give solution for this problem by patching them. Here are object-cache.php that you should put into wp-content : …

+ Read More

Fixing Memcached Problem in Ubuntu Natty

Fixing Memcached Problem in Ubuntu Natty

When restarting Memcached service, suddenly i got this kind of error : 12345678Restarting memcached: perl: warning: Setting locale failed. perl: warning: Please check that your locale settings:         LANGUAGE = (unset),         LC_ALL = (unset),         LANG = "en_US.UTF-8"     are supported and installed on …

+ Read More

How to get select value using Jquery

How to get select value using Jquery

Simple things, we want to grab value from select button on Jquery. If you want to get option value of select list, use this : 1$(‘select :selected’).val(); If you want to get text value in select list, use this : 1$(‘select :selected’).text();

Auto remember form input content while typing using JQUERY

Auto remember form input content while typing using JQUERY

When clients inserting data into form, suddenly their connection lost or accidentally refreshed the web page. And guess what? they facing new empty form again and feel tired to inserting same data again. We can reduce this by using JQUERY cookies which can remember what clients type into form. So, when they refreshed pages even …

+ Read More