Delete local branches that don't have a branch active on the remote.
git fetch -p ; git branch -r | awk '{print $1}' | egrep -v -f /dev/fd/0 <(git branch -vv | grep origin) | awk '{print $1}' | xargs git branch -D
function filterJSON(json, searchTerm, maxDepth = 10) { | |
// Function to check if the key or value matches the search term | |
function isMatch(value) { | |
if (value === null || value === undefined) return false; | |
if (typeof value === 'symbol') return value.toString().includes(searchTerm.toLowerCase()); | |
if (typeof value === 'object') return false; // Avoid stringifying complex objects here | |
return value.toString().toLowerCase().includes(searchTerm.toLowerCase()); | |
} | |
// Recursive function to filter the JSON based on searchTerm and depth |
function searchInJSON(json, searchTerm) { | |
console.log({ json }); | |
// Function to check if the key or value matches the search term | |
function isMatch(value) { | |
if (value === null || value === undefined) return false; | |
if (typeof value === 'symbol') return false; | |
if (typeof value === 'object') return false; | |
return value.toString().toLowerCase().includes(searchTerm.toLowerCase()); | |
} |
Delete local branches that don't have a branch active on the remote.
git fetch -p ; git branch -r | awk '{print $1}' | egrep -v -f /dev/fd/0 <(git branch -vv | grep origin) | awk '{print $1}' | xargs git branch -D
tell application "Contacts" | |
repeat with aPerson in people | |
-- Get old note, default to empty string if not present | |
set oldNote to note of aPerson | |
if oldNote is missing value then | |
set oldNote to "" | |
end if | |
-- Get old nickname, default to empty string if not present | |
set oldNickname to nickname of aPerson |
{ | |
"key": "shift+cmd+a", | |
"command": "extension.multiCommand.execute", | |
"args": { | |
"sequence": [ | |
"workbench.action.showAllEditorsByMostRecentlyUsed", | |
"workbench.action.quickOpenNavigateNext" | |
] | |
} | |
} |
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Koya Saito | Website Redirect</title> | |
<!-- Minified version --> | |
<!-- <link rel="stylesheet" href="https://cdn.simplecss.org/simple.min.css"> --> | |
<!-- Un-Minified version --> |
import itertools | |
a = [i for i in range(10)] | |
b = [chr(ord('a') + i) for i in range(5)] | |
print(f"{len(list(itertools.zip_longest(a, b)))=}") | |
for x, y in itertools.zip_longest(a, b): | |
print(f"{x=} {y=}") |
name: Refresh | |
on: | |
workflow_dispatch: | |
jobs: | |
refresh: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Trigger GitHub pages rebuild |
x = [i*"hi" for i in range(1, 10)] | |
print(x) | |
# print(x[0], x[1]) | |
# print(*x) | |
print(*x, sep="\n", end="\n"*2) | |
print(*x, sep="\n", end="\n"*2) | |
print(*x, sep="\n", end="\n"*2) |