Skip to content

Instantly share code, notes, and snippets.

View phette23's full-sized avatar
🌹
"you're right, no human being would stack books like this"

Eric Phetteplace phette23

🌹
"you're right, no human being would stack books like this"
View GitHub Profile
@acdha
acdha / Podman as a Docker Desktop replacement.md
Last active September 21, 2023 16:00
Instructions for using Podman as a Docker.app replacement on MacOS

Podman as a Docker Desktop alternative

Prerequisites

  1. Install Homebrew from https://brew.sh

Install Podman

$ brew install podman
@phette23
phette23 / projectcount.js
Last active October 30, 2023 15:39
todo.txt extension - count finished tasks by project references
#!/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 = {}
@SheldonWangRJT
SheldonWangRJT / Convert .mov or .MP4 to .gif.md
Last active April 15, 2024 20:14
Convert Movie(.mov) file to Gif(.gif) file in one command line in Mac Terminal

This notes is written by Sheldon. You can find me with #iOSBySheldon in Github, Youtube, Facebook, etc.

Need

Convert .mov/.MP4 to .gif

Reason

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.

@markusfisch
markusfisch / README.md
Last active October 8, 2022 06:21
Generate an annual commit report

Generate an annual commit report

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 ******************************************
@mreidsma
mreidsma / libguides_streamline.js
Last active February 22, 2017 19:10
Force single linked parents to take user directly to LibGuide on home page
// 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);
@steveklabnik
steveklabnik / wc.rs
Created March 23, 2015 21:50
a little wc-like in rust
#![feature(collections)]
use std::io::prelude::*;
use std::fs::File;
use std::io::BufReader;
fn main() {
let args: Vec<String> = std::env::args().collect();
let filename = args[1].clone();
@othiym23
othiym23 / npm-upgrade-bleeding.sh
Created September 20, 2014 19:36
a safe way to upgrade all of your globally-installed npm packages
#!/bin/sh
set -e
set -x
for package in $(npm -g outdated --parseable --depth=0 | cut -d: -f3)
do
npm -g install "$package"
done
@jbfink
jbfink / c4l-docker-outline.md
Created February 3, 2014 18:40
C4L Article
@dchud
dchud / ercamp-examples.md
Last active December 18, 2015 19:09
API call examples for ERcamp 2013 at GW Libraries