This file contains hidden or 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 python3 | |
""" | |
To make a video display in a web page so it adapts to the user, | |
you want to do two things: | |
1. serve the video at a size that matches the user's screen and | |
device. This is the job of responsive video, and is described by | |
https://scottjehl.com/posts/using-responsive-video/ very well |
This file contains hidden or 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
fn marine_line() -> String { | |
use rand::{seq::SliceRandom, Rng}; | |
let marine_life = ["🐳", "🐠", "🦈", "🐙", "🐡", "🐬", "🐟", "🦀", "🐋"]; | |
let water = [ | |
"\x1B[38;2;0;100;200m≈\x1B[0m", | |
"\x1B[38;2;10;110;210m≈\x1B[0m", | |
"\x1B[38;2;20;120;220m≈\x1B[0m", | |
"\x1B[38;2;30;130;230m≈\x1B[0m", | |
"\x1B[38;2;40;140;240m≈\x1B[0m", |
This file contains hidden or 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
import { parse } from "https://deno.land/x/[email protected]/mod.ts"; | |
var file = Deno.args[0]; | |
var input = await Deno.readTextFile(file); | |
var parsed = parse(input, { value: true }); | |
var root = { | |
rules: [], |
This file contains hidden or 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 python3 | |
# SPDX-License-Identifier: 0BSD or CC0-1.0 or MIT-0 or Unlicense | |
# Copyright (c) 2023, Ryan Castellucci, No Rights Reserved | |
import io, sys | |
import datetime | |
import argparse | |
import requests | |
import operator | |
import struct |
This file contains hidden or 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 killport { | |
echo '🚨 Killing all processes at port' $1 | |
lsof -ti tcp:$1 | xargs kill | |
} |
This file contains hidden or 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
# Taken from https://www.reddit.com/r/MacOS/comments/i4czgu/big_sur_airpods_script/gck3gz3/ | |
# by https://github.com/smithumble | |
use framework "IOBluetooth" | |
use scripting additions | |
set AirPodsName to "AirPods" | |
on getFirstMatchingDevice(deviceName) | |
repeat with device in (current application's IOBluetoothDevice's pairedDevices() as list) |
This file contains hidden or 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
#!/bin/bash | |
# http://redsymbol.net/articles/unofficial-bash-strict-mode/ | |
set -euo pipefail | |
IFS=$'\n\t' | |
# inspired by | |
# https://gist.github.com/codeinthehole/26b37efa67041e1307db | |
# https://github.com/why-jay/osx-init/blob/master/install.sh | |
# https://github.com/timsutton/osx-vm-templates/blob/master/scripts/xcode-cli-tools.sh |
This file contains hidden or 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
# v20201127 | |
# | |
# If you edit the files, you have to run "smtpctl update table <aliases|secrets>" | |
table aliases file:/etc/aliases | |
table secrets file:/etc/secrets | |
# To accept external mail, replace with: listen on all | |
# | |
listen on localhost |
This file contains hidden or 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
Mute these words in your settings here: https://twitter.com/settings/muted_keywords | |
ActivityTweet | |
generic_activity_highlights | |
generic_activity_momentsbreaking | |
RankedOrganicTweet | |
suggest_activity | |
suggest_activity_feed | |
suggest_activity_highlights | |
suggest_activity_tweet |
This file contains hidden or 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 ruby | |
# frozen_string_literal: true | |
# encoding: utf-8 | |
# | |
# TOTP implementation (google authenticator) | |
# | |
# Reads ~/.google-authenticator-accounts for account info. | |
# For security, you should run `chmod 600 ~/.google-authenticator-accounts | |
# | |
# Changelog: |
NewerOlder