| # based on https://gist.github.com/asfaltboy/b3e6f9b5d95af8ba2cc46f2ba6eae5e2 | |
| # based on https://gist.github.com/blueyed/4fb0a807104551f103e6 | |
| from django.db import connection | |
| from django.db.migrations.executor import MigrationExecutor | |
| from django.core.management import call_command | |
| import pytest | |
| #!/bin/bash | |
| # Copyright © 2017 Google Inc. | |
| # Licensed under the Apache License, Version 2.0 (the "License"); | |
| # you may not use this file except in compliance with the License. | |
| # You may obtain a copy of the License at | |
| # | |
| # http://www.apache.org/licenses/LICENSE-2.0 | |
| # | |
| # Unless required by applicable law or agreed to in writing, software | 
Run go install and
gogitlocalstats -add /path/to/folderwill scan that folder and its subdirectories for repositories to scangogitlocalstats -email [email protected]will generate a CLI stats graph representing the last 6 months of activity for the passed email. You can configure the default inmain.go, so you can rungogitlocalstatswithout parameters.
Being able to pass an email as param makes it possible to scan repos for collaborators activity as well.
This notes is written by Sheldon. You can find me with #iOSBySheldon in Github, Youtube, Facebook, etc.
Convert .mov/.MP4 to .gif
As a developer, I feel better to upload a short video when I create the pull request to show other viewers what I did in this PR. I tried .mov format directly got after finishing recording screen using Quicktime, however, gif offers preview in most web pages, and has smaller file size.
This is not limited to developer, anyone has this need can use this method to convert the files.
| # Typical use-case is decoding an AWS STS message. The DecodedMessage key contains escaped JSON. | |
| jq '.DecodedMessage | fromjson | .' message.json | 
- 
jq — https://jqlang.org/ — "like sed for JSON data"
There are several options available for installing jq. I prefer to use Homebrew:
brew install jq 
| # nbg1-dc3, CX11, Ubuntu 20.04, 10 GB EXT4 Volume | |
| # local SSD | |
| root@voltest:~# hdparm -Tt /dev/sda | |
| /dev/sda: | |
| Timing cached reads: 14624 MB in 1.99 seconds = 7341.48 MB/sec | 
This snippet will check every time you run Vim whether it updated all your Plug packages for you. It will do this once a week automatically for you.
Add the following to your .vimrc:
function! OnVimEnter() abort
  " Run PlugUpdate every week automatically when entering Vim.
  if exists('g:plug_home')
    let l:filename = printf('%s/.vim_plug_update', g:plug_home)
 if !filereadable(l:filename)