| #!/bin/sh | |
| # Git Insights Script - Enhanced version with auto-generated file exclusions | |
| # Usage: sh git-insights.sh [start_date] [end_date] | |
| # Example: sh git-insights.sh 2024-01-01 2024-12-31 | |
| function days_between { | |
| local start_timestamp="$1" | |
| local end_timestamp="$2" | |
| # Install NVM manually (https://github.com/creationix/nvm) | |
| # Install bass (https://github.com/edc/bass) | |
| # Add code below to your config.fish | |
| function nvm | |
| bass source ~/.nvm/nvm.sh --no-use ';' nvm $argv | |
| end | |
| nvm use default --silent |
| // This script will help you to endorse all skills w/o manual clicking on each | |
| // Open target LinkedIn profile and paste code below in browser's console | |
| Array.from(document.querySelectorAll('.pv-skill-entity__featured-endorse-button-shared')).filter(e => e.ariaPressed === 'false').forEach(e => e.click()) |
| function tryCatch (/* fn, context, arguments */) { | |
| var args = Array.prototype.slice.call(arguments); | |
| var fn = args[0]; | |
| var context = args[1]; | |
| args = args.slice(2, args.length); | |
| try { | |
| fn.apply(context, args); | |
| } catch (e) { |
| var path = require('path'); | |
| module.exports = (function () { | |
| return path.dirname(require.main.filename || process.mainModule.filename); | |
| })(); | |
| // Example of usage: | |
| var root = require('root'); // In root will be absolute path to your application |
| var parser = document.createElement('a'); | |
| parser.href = "http://example.com:3000/pathname/?search=test#hash"; | |
| parser.protocol; // => "http:" | |
| parser.hostname; // => "example.com" | |
| parser.port; // => "3000" | |
| parser.pathname; // => "/pathname/" | |
| parser.search; // => "?search=test" | |
| parser.hash; // => "#hash" | |
| parser.host; // => "example.com:3000" |
| EXAMPLE OF FULL-FETURED COMMIT MESSAGE: | |
| ================================================================================ | |
| EMKT-0000: Summarize changes in around 50 characters or less | <-- COMMIT SUBJECT | |
| More detailed explanatory text, if necessary. Wrap it to about 72 | | |
| characters or so. In some contexts, the first line is treated as the | | |
| subject of the commit and the rest of the text as the body. The blank | | |
| line separating the summary from the body is critical (unless you omit | | |
| the body entirely); various tools like `log`, `shortlog` and `rebase` | |
| ;(function () { | |
| var options = { | |
| name: 'logger', | |
| label: '❤', | |
| date: true, | |
| color: '#2980b9' | |
| }; | |
| window[options.name] = function () { | |
| var label = options.label + (options.date ? ('[' + Date() + ']') : '') | |
| , _arg = []; |
| var userCatched = 0; | |
| var handler = function (e) { | |
| if (!userCatched) { | |
| userCatched = !0; | |
| console.log('You\'re catched!'); | |
| } else { | |
| document.removeEventListener(e.type, arguments.callee); | |
| } | |
| } |