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
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDiUFb1IFEx/wV7z4/j6VevX5RJzlOB35aS4aXUSwaqfqFn/lq9/z73sfqymFUyH+lpFU8bqJ9CopT+pAj1OoJTdnb1guTEqdkwiwlAdU7rVn4c3qTU2o3Nk4f/85/FOWZJzXwAHK/CvRpiHVKBQv25gyW3rMCD/Gnx/KfUC5cwoQEyAfW91O+JmgkgWupka/+Rdgao1G942qbM4MseiAuL1E3TN2YkrrAVKX8DvueS35GvK707qpgyia02NOcsHStmONEd/daKl3qzJSfhETJc7ucE7/1vX/mHqpRP30ICc19knPMuzHQv9Gfh4r58om1xcul9DHAjuduVbYVJyKHzeYNxQ7XQT4+GrucPS/Fcut01fqAy+7FVFr/Ox/K8bpfXzuuZNaThFuMqD/SdX/Oq7ZeMKwAKp+arBrdjzQsUBVYxxAqgAga/kdd10VgiD8h2XCQHbyg5KvpPZ8G3VC/ya+1iDLkeNEfPow3l7z5LQmGxD1J417yaTi0LzEccuSM= zev@Zevs-MBP.fritz.box |
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
bind -r '\C-s' | |
stty -ixon |
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
// I created this for (and tested it on) a learn.cantrill.io course | |
// to quickly determine how much more video I have left to finish the course, | |
// so I could plan my time in advance of an AWS exam. | |
function getTotalMinutesLeftInCourse() { | |
let totalMinutes = 0; | |
for (const chapter of getChapters()) { | |
if (!chapterIsComplete(chapter)) { | |
const [minutes, seconds] = getMinutesAndSeconds(getLengthString(chapter.innerText)) |
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
#!/bin/sh | |
# ~/.githooks/post-checkout, identical to post-commit | |
set -o nounset | |
FILE_PATTERN="\\.bashrc\\|\\.env" | |
ENCRYPTED_PATTERN="\\$ANSIBLE_VAULT" | |
decrypt_if_needed() { | |
local file=$1 |
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
{"id":5,"date":"2023-02-05T10:05:40","date_gmt":"2023-02-05T10:05:40","guid":{"rendered":"https:\/\/myxomycete-principa.000webhostapp.com\/2023\/02\/test-wp-api","raw":"https:\/\/myxomycete-principa.000webhostapp.com\/2023\/02\/test-wp-api"},"modified":"2023-02-05T10:05:40","modified_gmt":"2023-02-05T10:05:40","password":"","slug":"test-wp-api","status":"publish","type":"post","link":"https:\/\/myxomycete-principa.000webhostapp.com\/2023\/02\/test-wp-api","title":{"raw":"Test WP-API","rendered":"Test WP-API"},"content":{"raw":"This is my first post created using restAPI","rendered":"<p>This is my first post created using restAPI<\/p>\n","protected":false,"block_version":0},"excerpt":{"raw":"","rendered":"<p>This is my first post created using restAPI<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_mi_skip_tracking":false},"categories":[1],"tags":[],"permalink_template":"https:\/\/myxomycete-princip |
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
# The lecture listing is here: https://archive.org/details/ucberkeley-webcast-PL3E89002AA9B9879E?sort=titleSorter | |
# NOTE: the URLs were obtained by running this in the JS console on each of the lecture pages: | |
# > copy(document.getElementsByClassName("item-download-options")[0].children[2].children[1].href) | |
cat vid_urls.txt | while read line; do echo $line | wget $line -O lecture_$(sed -E 's/.*Lecture%20([0-9]+).*/\1/').mp4; done |
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
airline.vim | |
arduino.vim | |
coc.vim | |
commentary.vim | |
context-commentstring.vim | |
dispatch.vim | |
dracula.vim | |
editorconfig.vim | |
eunuch.vim | |
exchange.vim |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<array> | |
<dict> | |
<key>Activate</key> | |
<string>Normal</string> | |
<key>CreationDate</key> | |
<real>657286652.24957097</real> | |
<key>Macros</key> |
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
from typing import Dict, Tuple, Any, List | |
def make_tuple_partitions( | |
unique_values: List[Any], num_partitions: int | |
) -> Dict[Tuple[int, int], Tuple[Any, Any]]: | |
""" | |
Given a list of values, return a dictionary with (the_index, the_index + 1) as the keys | |
and (chunk_start_value, chunk_end_value) as the values such that the chunks are equal | |
or close to equal in size. |
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
import re | |
from black import format_str, FileMode | |
def convert_tablemapping_to_table_object(model) -> str: | |
schema_name = model.__table_args__["schema"].lower() | |
table_repr = repr(model.__table__) | |
header_str, *columns = table_repr.split("Column(") | |
# from https://stackoverflow.com/a/4145486/4386191 |
NewerOlder