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 json | |
import os | |
import re | |
from xml.etree import ElementTree | |
def get_track_attr (track, attr_name): | |
# iterate over each attr to find the filename | |
attributes = list(track) | |
for a in range(len(attributes)): | |
attr = attributes[a] |
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
// Vanilla solution | |
let format = require('util').format; | |
const COLORS = [ | |
{ stop: 0, rgb: [35, 198, 161] }, | |
{ stop: 6, rgb: [245, 235, 73] }, | |
{ stop: 48, rgb: [245, 51, 0] }, | |
]; | |
function getRGBColor (hours) { |
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
class Bag { | |
constructor (capacity) { | |
this.capacity = capacity; | |
this.cakes = []; | |
this.weight = 0; | |
this.value = 0; | |
} | |
addCake (cake) { | |
this.cakes.push(cake); |
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
// This script is intended to be run from a web console. It must be run from the correct webpage. | |
// Step 1: Fill out this and search https://process.dmv.ny.gov/FacilityLookup/ | |
// Step 2: Select your vehicle type, etc until you receive results | |
// Step 3: Edit the countResults variable below to the actual number | |
// Step 4: Inject jQuery into the webpage by copying the commented code below into the web console | |
// var jq = document.createElement('script');jq.src = "https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js";document.getElementsByTagName('head')[0].appendChild(jq); | |
// Step 5: Copy and paste the below into your web console and run it. When the searching is finished, you should receive an array of matches logged to console. | |
// modify this value to be the total # of results |
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 glob = require("glob"); | |
const { execSync } = require('child_process'); | |
console.log('building list of files'); | |
const opts = { absolute: true }; | |
var files = glob.sync("**/*.ts", opts).concat(glob.sync("**/*.tsx", opts)).filter(f => f.indexOf('node_modules') < 0); | |
console.log(`found ${files.length} files`); |
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/bash | |
# | |
# Read this script and modify it before running. It's not tested as is and is not | |
# meant to be run unsupervised. | |
# | |
hostname='YOUR_DESIRED_HOSTNAME' | |
user='YOUR_USERNAME' | |
hdd_spindown_timeout=1800 |
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
$ rm -Rf ~/.config/darktable ~/.cache/darktable | |
$ /Applications/darktable.app/Contents/MacOS/darktable -d all | |
0.000898 application_directory: /Applications/darktable.app/Contents/MacOS | |
0.001040 darktable.datadir: /Applications/darktable.app/Contents/Resources/share/darktable | |
0.001123 darktable.plugindir: /Applications/darktable.app/Contents/Resources/lib/darktable | |
0.001196 darktable.localedir: /Applications/darktable.app/Contents/Resources/share/locale | |
0.001392 darktable.configdir: /Users/curiouser/.config/darktable | |
0.001539 darktable.cachedir: /Users/curiouser/.cache/darktable | |
0.001617 darktable.sharedir: /Applications/darktable.app/Contents/Resources/share | |
0.001709 darktable.tmpdir: /private/var/folders/jg/8sl7jff55y7dh77tfpztd4pr0000gn/T |
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 node | |
const currentYear = new Date().getFullYear(); | |
const adjustments = { | |
exteriorColor: { | |
black: 1000, | |
blue: -500, | |
burgundy: 500, | |
charcoal: 500, |
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
[ 0.000000] microcode: microcode updated early to revision 0x88, date = 2021-03-31 | |
[ 0.000000] Linux version 5.15.15-76051515-generic (jenkins@warp.pop-os.org) (gcc (Ubuntu 11.2.0-7ubuntu2) 11.2.0, GNU ld (GNU Binutils for Ubuntu) 2.37) #202201160435~1642693824~21.10~97db1bb SMP Thu Jan 20 17:35:05 U | |
[ 0.000000] Command line: initrd=\EFI\Pop_OS-5b30118c-3837-4895-9c60-70ea27dd36d9\initrd.img root=UUID=5b30118c-3837-4895-9c60-70ea27dd36d9 ro quiet systemd.show_status=false splash resume=UUID=f44f6cb9-8bab-4ab8-99fb-c409ad6e9668 loglevel=0 | |
[ 0.000000] KERNEL supported cpus: | |
[ 0.000000] Intel GenuineIntel | |
[ 0.000000] AMD AuthenticAMD | |
[ 0.000000] Hygon HygonGenuine | |
[ 0.000000] Centaur CentaurHauls | |
[ 0.000000] zhaoxin Shanghai | |
[ 0.000000] x86/split lock detection: #AC: crashing the kernel on kernel split_locks and warning on user-space split_locks |
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
network: | |
renderer: NetworkManager | |
version: 2 | |
tunnels: | |
wg0: | |
mode: wireguard | |
addresses: | |
- 10.10.10.102/32 | |
key: <private key> | |
peers: |
OlderNewer