Prints something like this:
In 2018 you made 2488 commits in 134 projects.
The average length of a commit message was 62 characters.
Commits per weekday
Monday 334 ******************************************
// Make sure you are on the homepage | |
if($('#s-lg-index-list').length > 0) { | |
// Loop through all the subjects | |
$('#s-lg-index-cols').find('div.panel.panel-default').each(function() { | |
// Get the number of guides in this subject | |
var guides = $(this).find('.badge').text(); | |
// console.log('Number of guides: ' + guides); |
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.
#!/usr/bin/env node | |
const fs = require('fs') | |
const path = require('path') | |
const readline = require('readline') | |
const todo_dir = process.env.TODO_DIR | |
// TODO we could make this optionally count todo.txt too e.g. with a CLI flag | |
const done_file = path.join(todo_dir, 'done.txt') | |
const projregex = /(\+[A-Za-z0-9]+)(\s|$)/g | |
const ctxregex = /(@[A-Za-z0-9]+)(\s|$)/g | |
let counts = {} |
$ brew install podman