As configured in my dotfiles.
start new:
tmux
start new with session name:
| /* | |
| For some reason, the change() event only fires when the input field loses focus. | |
| Binding to other options ('change keypress paste focus textInput input') will | |
| fire the event several times, which is bad. The below code works even when | |
| content is pasted into the text field, and only fires once as expected. | |
| */ | |
| $('#search-form .term').bind('input', function(){ | |
| console.log('this actually works'); | |
| }); |
| /** | |
| * app/bootstrap.php | |
| */ | |
| Autoloader::add_classes(array( | |
| // Add classes you want to override here | |
| // Example: 'View' => APPPATH.'classes/view.php', | |
| 'Uri' => APPPATH.'classes/uri.php', | |
| 'LayoutHelper' => APPPATH.'classes/layouthelper.php', | |
| )); |
As configured in my dotfiles.
start new:
tmux
start new with session name:
| /** | |
| * Create HTML list of nav menu items and allow HTML tags. | |
| * Replacement for the native menu Walker, echoing the description. | |
| * This is the ONLY known way to display the Description field. | |
| * | |
| * @see http://wordpress.stackexchange.com/questions/51609/ | |
| * | |
| */ | |
| class Description_Walker extends Walker_Nav_Menu { |
| #!/usr/bin/env sh | |
| # Download lists, unpack and filter, write to stdout | |
| curl -s https://www.iblocklist.com/lists.php \ | |
| | sed -n "s/.*value='\(http:.*=bt_.*\)'.*/\1/p" \ | |
| | xargs wget -O - \ | |
| | gunzip \ | |
| | egrep -v '^#' |
| /** | |
| * Borrowed from https://github.com/addyosmani/jquery-ui-bootstrap | |
| * Styles the datepicker popup for gravityforms used with bootstrap | |
| */ | |
| /* | |
| * jQuery UI Datepicker | |
| * | |
| * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) | |
| * Dual licensed under the MIT or GPL Version 2 licenses. | |
| * http://jquery.org/license |
I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!
\
Magic words:
psql -U postgresSome interesting flags (to see all, use -h or --help depending on your psql version):
-E: will describe the underlaying queries of the \ commands (cool for learning!)-l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)| // 34567890123456789012345678901234567890123456789012345678901234567890123456789 | |
| // JSHint: 22 March 2015 08:56 GMT | |
| // Unit Tests: 22 March 2015 08:50 GMT | |
| /* | |
| * Copyright (C) 2015-2017 Andrew Roberts ([email protected]) | |
| * | |
| * This program is free software: you can redistribute it and/or modify it under | |
| * the terms of the GNU General Public License as published by the Free Software |