Compile program using:
clang -o video_capture_devices video_capture_devices.m -framework Foundation -framework AVFoundation -framework CoreMediaSample output:
| package main | |
| import ( | |
| "context" | |
| "log" | |
| "net/http" | |
| "os" | |
| "os/signal" | |
| "time" | |
| ) | 
| #!/usr/bin/env sh | |
| usage() { | |
| echo "show-ansi-colors <n>" | |
| exit 0 | |
| } | |
| (( $# < 1 )) && usage | |
| show_ansi_colors() { | 
| /** | |
| * @desc Basic linear value animation that can accept simple easing functions and provides update & complete callbacks | |
| * @param {Object} values - Object with numerical values. eg. { value1: 0, value2: 20, someKey: 55 } | |
| * @param {Number} duration - How long (in milliseconds) the animation will be | |
| * @param {Object} options - target values, update callback & complete callback | |
| * @param {Function} [options.onComplete=(values) => values] - Callback that fires once animation is complete | |
| * @param {Function} [options.onUpdate=(values) => values] - Callback that fires when animation frame updates | |
| * @param {Function} [options.ease=(t) => t] - easing method eg. https://gist.github.com/gre/1650294 | |
| * @example | |
| * | 
| // src/app/services/token-interceptor.service.ts | |
| import { Injectable } from "@angular/core"; | |
| import { HttpRequest, HttpHandler, HttpEvent, HttpInterceptor } from "@angular/common/http"; | |
| import { AuthenticationService } from "../authentication.service"; | |
| import { Observable } from "rxjs/Observable"; | |
| import { BehaviorSubject } from "rxjs/BehaviorSubject"; | |
| @Injectable() | |
| export class RefreshTokenInterceptor implements HttpInterceptor { | 
Follow the instructions on Github to Create an Access Token in Github
By default, git credentials are not cached so you need to tell Git if you want to avoid having to provide them each time Github requires you to authenticate. On Mac, Git comes with an “osxkeychain” mode, which caches credentials in the secure keychain that’s attached to your system account.
You can tell Git you want to store credentials in the osxkeychain by running the following:-
| package main | |
| import ( | |
| "net/http" | |
| "compress/gzip" | |
| "io/ioutil" | |
| "strings" | |
| "sync" | |
| "io" | |
| ) | 
| // Conversion of interface{} or map[string]interface{} types to protobuf struct ("google/protobuf/struct.proto"). | |
| package codec | |
| import ( | |
| "encoding/json" | |
| structpb "github.com/golang/protobuf/ptypes/struct" | |
| "google.golang.org/protobuf/encoding/protojson" | |
| ) | 
| #!/bin/bash | |
| # Current month | |
| # ./git-worklog.sh | |
| # Specific month and year | |
| # ./git-worklog.sh --month 3 --year 2025 | |
| # Custom output file | |
| # ./git-worklog.sh --month 3 --year 2025 --output april-2025-worklog.md |