start new:
tmux
start new with session name:
tmux new -s myname
| //How to validate selectize.js comboboxes with the jQuery validation plugin | |
| //selectize.js: http://brianreavis.github.io/selectize.js/ (brianreavis/selectize.js) | |
| //http://jqueryvalidation.org (jzaefferer/jquery-validation) | |
| //configure jquery validation | |
| $("#commentForm").validate({ | |
| //the default ignore selector is ':hidden', the following selectors restore the default behaviour when using selectize.js | |
| //:hidden:not([class~=selectized]) | selects all hidden elements, but not the original selects/inputs hidden by selectize | |
| //:hidden > .selectized | to restore the behaviour of the default selector, the original selects/inputs are only validated if their parent is visible | |
| //.selectize-control .selectize-input input | this rule is not really necessary, but ensures that the temporary inputs created by selectize on the fly are never validated |
| # adding and committing | |
| git add -A # stages All | |
| git add . # stages new and modified, without deleted | |
| git add -u # stages modified and deleted, without new | |
| git commit --amend # Add staged changes to previous commit. Do not use if commit has been pushed. | |
| git commit --amend --no-edit # Do so without having to edit the commit message. | |
| # remotes - pushing, pulling, and tracking | |
| git fetch # gets remote objects and refs. Needed if new branches were added on the remote. | |
| git remote -v # Lists all remotes (verbose) |
| { | |
| "parser": "babel-eslint", | |
| "env": { | |
| "browser": true, | |
| "node": true, | |
| "es6": true | |
| }, | |
| "ecmaFeatures": { | |
| "jsx": true, | |
| "modules": true, |
| teams: | |
| - name: Purple | |
| description: nothing compares 2 U | |
| - name: Green | |
| description: blah blah blah | |
| - name: Magenta | |
| - name: Olive | |
| employees: | |
| - |
A Pen by Codemash D3 Presentation on CodePen.
| try: | |
| import sqlparse.format as sqlformat | |
| except ImportError: | |
| def sqlformat(query, **kwargs): | |
| """Monkey patch sqlparse.format if package not installed""" | |
| return query | |
| def debug_query(query, engine): | |
| """Return a parametrized and formated sql query for debugging |