- Use this tab function as an alias
- Chain two commands together and enclose each command in quotes. Example:
tab "watchify public/assets/js/sick.js -o public/assets/js/app.js -v" && tab "nodemon server.js"
tab "watchify public/assets/js/sick.js -o public/assets/js/app.js -v" && tab "nodemon server.js"
| var Gallery = (function() { | |
| // whole lotta code here | |
| })(); |
| _main.$pushLinks.each(function(){ | |
| $(this).on('click', function(e){ | |
| _push.clickEvent = true; | |
| var $el = $(this); | |
| _mobile.mobileCheck($el); | |
| _filters.urlAnalyzer('add', $el, false); | |
| return false; | |
| }); | |
| }); |
| #!/bin/bash | |
| # | |
| # Open new Terminal tabs from the command line | |
| # | |
| # Original Author: Justin Hileman (http://justinhileman.com) | |
| # Modified By: Khaliq Gant (http://khaliqgant.com) | |
| # Installation: | |
| # Add the following function to your `.bashrc` or `.bash_profile`, | |
| # or save it somewhere (e.g. `~/.tab.bash`) and source it in `.bashrc` or `.zshrc` |
| /** | |
| * | |
| * Generate Schema | |
| * @desc dynamically create the JSON Schema | |
| * @see https://github.com/YousefED/typescript-json-schema#programmatic-use | |
| * @return {Object} schema | |
| * | |
| */ | |
| function generateSchema (interfaceType: string): Object { | |
| const program = TJS.getProgramFromFiles([resolve('./interfaces/admin/SchemaResponse.ts')], {strictNullChecks: true}); |
| // this function takes an array of date ranges in this format: | |
| // [{ start: Date, end: Date}] | |
| // the array is first sorted, and then checked for any overlap | |
| function overlap(dateRanges){ | |
| var sortedRanges = dateRanges.sort((previous, current) => { | |
| // get the start date from previous and current | |
| var previousTime = previous.start.getTime(); | |
| var currentTime = current.start.getTime(); |
| # with auth | |
| > psql -h 10.000.0.0 -d mydb -U myuser | |
| > psql postgres postgres | |
| drop schema public cascade; | |
| create schema public; | |
| \q and enter to exit |
| # dump | |
| pg_dump -h localhost -U postgres -p 5432 -Fc -Z 9 --file=local.dump | |
| # restore | |
| pg_restore -h localhost -U postgres -Fc -j 8 -p 5432 -vvv -d postgres local.dump | |
| # source: https://stackoverflow.com/questions/15692508/a-faster-way-to-copy-a-postgresql-database-or-the-best-way |
| \t | |
| \a | |
| \o data.json | |
| select json_agg(t) FROM (SELECT * from schedules_required_shifts) t; | |
| // https://dba.stackexchange.com/questions/90482/export-postgres-table-as-json |
| username LIKE '%zveer%' | |
| https://www.tutorialspoint.com/postgresql/postgresql_like_clause.htm |