Skip to content

Instantly share code, notes, and snippets.

View aqualad's full-sized avatar

Bryan Dodd aqualad

  • OnShift
  • Cleveland, OH
View GitHub Profile
@aqualad
aqualad / Fix babel-eslint crashes.md
Last active March 31, 2017 17:04
Fix for eslint crashing in Sublime when missing babel-eslint
  1. In the application toolbar
    Select Sublime Text > 
        Preferences > 
            Package Settings > 
                Either Babel or ESLint > 
                    Settings Default
    
  2. Find the setting for the node_modules install path in OS X
  • currently located at /usr/local/lib/node_modules
@nZac
nZac / sqlalchemy_debugger.py
Last active April 16, 2019 13:07
SQLAlchemy query to compiled SQL string
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
@yannleretaille
yannleretaille / validate-selectize-fields.js
Last active June 13, 2024 21:38
How to validate selectize.js comboboxes with the jQuery validation plugin
//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
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active July 24, 2024 17:56
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname