- Select images for combining in Finder
This file contains 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
(function () { | |
const overlay = document.querySelector("#ContentWallHardsell"); | |
overlay.parentNode.removeChild(overlay); | |
document.body.style.overflow = "visible"; | |
(function (elem, eventType) { | |
for (const { listener, useCapture } of getEventListeners(elem)[eventType] || | |
[]) { | |
elem.removeEventListener(eventType, listener, { useCapture }); |
This file contains 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
[default] | |
[profile jonsmith] | |
credential_process=aws-vault exec jonsmith --json --prompt=osascript | |
[profile dev] | |
source_profile=jonsmith | |
region=ap-southeast-2 | |
role_arn=arn:aws:iam::123456789:role/DevRole |
This file contains 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
const { execSync, spawn } = require('child_process'); | |
const AWS_PROFILE = process.argv[2]; | |
const PARAMETERS_PATH = '/path/to/env/'; | |
const { Parameters: params } = JSON.parse( | |
execSync(`aws --profile ${AWS_PROFILE} ssm get-parameters-by-path --path "${PARAMETERS_PATH}" --with-decryption`) | |
); |
This file contains 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
TZ= | |
INTERFACE= | |
FTLCONF_LOCAL_ADDR4= | |
FTLCONF_LOCAL_ADDR6= | |
WEBPASSWORD= |
This file contains 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 | |
# parallel runs in N-process batches | |
# https://unix.stackexchange.com/a/216475 | |
N=4 | |
# enable globstar, requires bash >=4.0 | |
shopt -s globstar | |
for f in ../iTunes\ Media/**/*.m4a; do |
This file contains 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
require 'base64' | |
print Base64.encode64(File.open(ARGV.first, 'rb').read).gsub(/\s/, '') |
This file contains 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
const http = require("http"); | |
const server = http.createServer((req) => { | |
console.info(`${new Date()} ${req.method} ${req.url}`); | |
}); | |
server.listen(8080); |
This file contains 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
# frozen_string_literal: true | |
require 'benchmark' | |
def repeat_naive(str, num) | |
result = '' | |
str = str.to_s | |
num = num.to_i | |
while num.nonzero? | |
result += str |
This file contains 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 | |
# Usage: v2gif video.mov video.gif | |
ffmpeg -i "$1" -vf "fps=5,scale=640:-1:flags=lanczos,split[s0][s1];[s0]palettegen[p];[s1][p]paletteuse" -loop 0 "$2" |
NewerOlder