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
# #popclip | |
# { name: Memos, icon: iconify:si:memory-fill, after: show-result, interpreter: python3 } | |
import json | |
import os | |
import urllib.request | |
print(os.environ) | |
payload = { | |
"state": "NORMAL", |
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 time | |
from bs4 import BeautifulSoup | |
from prometheus_client import start_http_server, Gauge | |
import requests | |
ga = Gauge('anomalies', 'A description', ['category', 'site']) | |
ga_categories = ['telecom', 'finance', 'online-services', 'social-media', 'gaming'] | |
headers = {'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36'} |
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
Array.from(document.querySelectorAll('.inspector-torrent-file-list-entry')).filter(e => e.children[1].textContent.includes('ia')).forEach(e => e.checkbox.click()) |
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
# Prereqs: pip install pendulum markdownify | |
import json | |
from string import Template | |
from markdownify import markdownify as md | |
import pendulum | |
with open("diary.json", "r") as file: | |
data = json.loads(file.read()) |
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
worker_processes 2; | |
user www-data; | |
events { | |
use epoll; | |
worker_connections 128; | |
} | |
error_log /dev/stdout info; |
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 glob | |
import json | |
import flatdict | |
tests = glob.glob('logstash/testcases/*.json') | |
for test in tests: | |
print(test) | |
with open(test, 'r') as file: |
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
async function youtube (tp) { | |
const url = await tp.system.clipboard() | |
const response = await fetch(`https://youtube.com/oembed?url=${url}&format=json`) | |
const data = await response.json() | |
const title = data.title.replaceAll("", "").replaceAll('"', '').replaceAll("\\", "").replaceAll("/", "").replaceAll("<", "").replaceAll(">", "").replaceAll(":", "").replaceAll("|", "").replaceAll("?", "") | |
tp.file.rename(title) | |
const regex = /v=(.*)/gm; | |
const m = regex.exec(url) | |
return m[1] | |
} |
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
apiVersion: backstage.io/v1alpha1 | |
kind: Component | |
metadata: | |
name: artist-web | |
description: The place to be, for great artists | |
labels: | |
example.com/custom: custom_label_value | |
annotations: | |
example.com/service-discovery: artistweb | |
circleci.com/project-slug: github/example-org/artist-website |
This file has been truncated, but you can view the full file.
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
{ | |
" Vigilante 8 (PSX) (gamerip) ": "/game-soundtracks/album/vigilante-8-original-game-rip", | |
"#killallzombies (2016) (PC)": "/game-soundtracks/album/killallzombies-2016-pc", | |
"'96 Zenkoku Koukou Soccer Senshuken (1996) (SNES)": "/game-soundtracks/album/96-zenkoku-koukou-soccer-senshuken-1996-snes", | |
"007 - NightFire (2002) (PS2) (gamerip)": "/game-soundtracks/album/007-nightfire-2002-ps2", | |
"007 - NightFire (2002) (Xbox) (gamerip)": "/game-soundtracks/album/007-nightfire-2002-xbox", | |
"007 - Nightfire (2002) (GC) (gamerip)": "/game-soundtracks/album/007-nightfire-2002-gc", | |
"007 - Quantum of Solace (2008) (NDS) (gamerip)": "/game-soundtracks/album/007-quantum-of-solace-2008-nds-gamerip", | |
"1-2 Switch (2017) (Switch)": "/game-soundtracks/album/1-2-switch-2017-switch", | |
"10 Second Run RETURNS (Switch)": "/game-soundtracks/album/10-second-run-returns-switch", |
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
let tiles = [] | |
document.querySelector("game-app").$board.querySelectorAll("game-row").forEach(row => { | |
let rowTiles = [] | |
row.$tiles.forEach(tile => rowTiles.push(tile._state)) | |
tiles.push(rowTiles) | |
}) | |
for (let row of tiles) { | |
let rowString = "" |
NewerOlder