Quick references to common and useful python3 best-practices programming snippets and boilerplate.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- Found at: | |
| -- http://www.if-not-true-then-false.com/2009/postgresql-psql-psqlrc-tips-and-tricks/ | |
| -- http://opensourcedbms.com/dbms/psqlrc-psql-startup-file-for-postgres/ | |
| \set QUIET ON | |
| \pset pager always | |
| \pset null 'NULL' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| ## | |
| # | |
| # @author Jay E. Taylor <jay@jaytaylor.com> | |
| # | |
| # @description Math functions for bash! | |
| # | |
| ## |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| set -e | |
| ## | |
| # @author Jay Taylor [@jtaylor] | |
| # | |
| # @date 2014-06-28 | |
| # | |
| # @description Git repository statistics: Get # of commits and lines changed since some previous point in time. | |
| # |
Just plug in your own values for registry and repo/image name.
registry='localhost:5000'
name='my-image'
curl -v -sSL -X DELETE "http://${registry}/v2/${name}/manifests/$(
curl -sSL -I \
-H "Accept: application/vnd.docker.distribution.manifest.v2+json" \The landscape of AI-powered command-line coding assistants has exploded recently, each taking a different philosophical approach to the same fundamental problem: how do we make writing code less tedious without sacrificing control? Here's a breakdown of four notable players worth your attention.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| ## | |
| # @author Jay Taylor [@jtaylor] | |
| # @date 2013-08-15 | |
| # | |
| # @description CloudFlare management script. | |
| # | |
| # Path ENV VAR override. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # | |
| # Mac OS-X does not come with the delightfully useful `timeout` program. Thankfully a rough BASH equivalent can be achieved with only 2 perl statements. | |
| # | |
| # Originally found on SO: http://stackoverflow.com/questions/601543/command-line-command-to-auto-kill-a-command-after-a-certain-amount-of-time | |
| # | |
| function timeout() { perl -e 'alarm shift; exec @ARGV' "$@"; } | |
| ## Example usage: | |
| # |
Sort .gitmodules, also easily adaptable to sort files in blocks (e.g. 4 lines at a time, or arbitrary region at a time).
See also:
#!/usr/bin/env bashNewerOlder