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 fs from 'fs/promises'; | |
import path from 'path'; | |
const source = '/Volumes/Untitled/DCIM/101MSDCF' | |
const dest = '/Volumes/JonLuca\'s\ Pics/Pics/San\ Francisco,\ CA\ \(Fleetweek\)/' | |
const sourceFiles = await fs.readdir(source) | |
const destFiles = await fs.readdir(dest) | |
const filesToCopy = sourceFiles.filter(f => !destFiles.includes(f)) | |
console.log(`Copying ${filesToCopy.length} files`) | |
let done = 0; |
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 http.cookies | |
http.cookies._is_legal_key = lambda _: True | |
import asyncio | |
import aiohttp | |
import nest_asyncio | |
import time | |
nest_asyncio.apply() | |
async def gather_with_concurrency(n, *tasks): | |
semaphore = asyncio.Semaphore(n) |
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 sys | |
import os | |
import json | |
import asyncio | |
import aiohttp | |
# Initialize connection pool | |
conn = aiohttp.TCPConnector(limit_per_host=100, limit=0, ttl_dns_cache=300) | |
PARALLEL_REQUESTS = 100 |
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 os | |
from github import Github | |
# set an environment variable named GITHUB_KEy to the access token from here https://github.com/settings/tokens | |
# this script watches all repositories that are under your username | |
# if you'd like to watch all the repos you've contributed to or that are in your orgs, remove the if check on line 12 | |
g = Github(os.environ['GITHUB_KEY']) | |
user = g.get_user() |
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
{ | |
"videos": { | |
"80988062": { | |
"interactiveVideoMoments": { | |
"$type": "atom", | |
"$size": 273075, | |
"value": { | |
"type": "bandersnatch", | |
"choicePointNavigatorMetadata": { | |
"config": { |
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
Software Versions: | |
CoreWLAN: 13.0 (1370.8) | |
CoreWLANKit: 13.0 (1370.8) | |
Menu Extra: 13.0 (1376.2) | |
System Information: 12.0 (1300.2) | |
IO80211 Family: 12.0 (1200.12.2) | |
Diagnostics: 1.0 (805) | |
AirPort Utility: 6.3.9 (639.7) | |
Interfaces: | |
en0: |
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
+-o ARPT@0 <class IOPCIDevice, id 0x10000037e, registered, matched, active, busy 0 (18308 ms), retain 17> | |
| { | |
| "IOInterruptControllers" = ("io-apic-0","IOPCIMessagedInterruptController") | |
| "built-in" = <00> | |
| "wlan.tx.ring.size" = 512 | |
| "bcom.oscar.profilestates" = <0000000200200022090d0000> | |
| "bcom.roam.profiles" = <0c00f6ffb5ff0200b80bb4000200b0041400bfff32001000b5ff80ff02005a001e0001001e000c00bfff3200000000000000000000000000000000000000000000001000b5ff80ff02005a001e0001001e000c0080ff0a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001400b5ff80ff02005a001e000200b4000c00bfff320000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001400b5ff80ff02005a001e000200b4000c0080ff0a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c00f6ffb5ff0200b80bb4000200b0041400bfff32001000b5ff80ff02005a001e000200b4000c00bfff3200000000000000000000000000000000000000000000001000b5ff80ff02005a001 |
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
Waiting for ifconfig, hit Ctrl-C to stop waiting... | |
PID/THRD RELATIVE ELAPSD CPU SYSCALL(args) = return | |
38782/0x244665: 701 54 0 thread_selfid(0x0, 0x0, 0x0) = 2377317 0 | |
dyld`__thread_selfid+0xa | |
dyld`mach_init+0x13 | |
dyld`dyldbootstrap::start(macho_header const*, int, char const**, long, macho_header const*, unsigned long*)+0x432 | |
dyld`_dyld_start+0x36 | |
ifconfig`0x4 |
This file has been truncated, but you can view the full file.
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
PID/THRD RELATIVE ELAPSD CPU CALL(args) = return | |
40994/0x24b5f4: 1093 . . -> dyld:mach_msg_destroy(0x7FFEE2BE0970, 0x3, 0xA80) | |
40994/0x24b5f4: 1095 . . -> dyld:mach_msg_destroy_port(0x0, 0x0, 0xA80) | |
40994/0x24b5f4: 1096 . . -> dyld:mach_msg_destroy_port(0x0, 0x0, 0xA80) | |
40994/0x24b5f4: 1099 . . -> dyld:mach_port_destruct(0x203, 0x807, 0x0) | |
40994/0x24b5f4: 1100 . . -> dyld:_kernelrpc_mach_port_destruct_trap(0x203, 0x807, 0x0) | |
40994/0x24b5f4: 1108 19 7 <- dyld:_kernelrpc_mach_port_destruct_trap = 10 | |
40994/0x24b5f4: 1110 54 10 <- dyld:mach_port_destruct = 66 | |
40994/0x24b5f4: 1124 . . -> libdyld.dylib:tlv_initializer(0x203, 0x807, 0x0) | |
40994/0x24b5f4: 1131 . . -> libsystem_pthread.dylib:pthread_key_create(0x7FFF9DF13FF0, 0x7FFF6B138BA2, 0x0) |
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
kill_by_port(){ | |
lsof -i ":${1}" | awk 'NR > 1 {print $2}' | xargs kill -9 | |
} |
NewerOlder