- Test-Driven Development (TDD) with pytest: Always write a failing test before writing implementation code (Red-Green-Refactor). Use
pytest
andpytest-fixtures
for test setup, execution, and teardown. - KISS (Keep It Simple, Stupid): Favor the simplest solution that meets the requirements.
- DRY (Don't Repeat Yourself): Avoid code duplication. Extract reusable logic into functions or classes.
- Standard Libraries and Tools: Utilize standard Python libraries (like
datetime
for date/time,requests
for HTTP requests, andlogging
) and external libraries, includingBeautifulSoup4
for HTML parsing, to avoid reinventing the wheel. Favor well-maintained and widely-used libraries. - YAGNI (You Ain't Gonna Need It): Don't implement features or functionality unless they are currently required.
- SOLID Principles & Extensibility: Adhere to SOLID principles, promoting maintainability, testability, and future extension. Consider potential future requi
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
# Delete all forks that haven't been updated since 2020 | |
gh auth refresh -h github.com -s delete_repo | |
gh search repos \ | |
--owner tonybaloney \ | |
--updated="<2020-01-01" \ | |
--include-forks=only \ | |
--limit 100 \ | |
--json url \ | |
--jq ".[] .url" \ | xargs -I {} gh repo delete {} --confirm |
This note details the changes made to the Zen and ZMK codebase to improve the experience of e-ink displays.
You can test out below changes using your Zen config repo by modifying your config/west.yml
file, following ZMK instructions:
manifest:
remotes:
- name: caksoylar
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
// Extract JSON payload from SHC QR code (without any kind of private/public key verification) | |
// Credits + inspiration | |
// https://github.com/dvci/health-cards-walkthrough/blob/main/SMART%20Health%20Cards.ipynb | |
// Usage | |
// $ node shc.js "shc:/01234569…" | |
const zlib = require("zlib"); |
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
addEventListener('fetch', event => { | |
event.respondWith(fetchAndApply(event.request)) | |
}) | |
async function fetchAndApply(request) { | |
let response = await fetch(request) | |
let referer = request.headers.get('Referer') | |
let contentType = response.headers.get('Content-Type') || '' | |
if (referer && contentType.startsWith('image/')) { |
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 datetime | |
import random | |
from typing import List | |
def main(): | |
random.seed(172) | |
count = 1_000_000 | |
data = build_data(count) | |
run_with_except(data) |
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
TEAM | POINTS | LAST SUBMIT | |
----------------------------------+--------+------------------- | |
<CA> HubrETS Hackin'' | 155 | 2020/05/17 14:58 | |
<CA> Les Gentils Pirates | 133 | 2020/05/17 14:42 | |
<CA> CLICKESTI | 129 | 2020/05/17 14:07 | |
<US> Skiddies as a Service | 125 | 2020/05/17 14:44 | |
<CA> cold_root | 116 | 2020/05/17 14:38 | |
<CA> Panique Au Village | 94 | 2020/05/17 14:47 | |
<CA> Shopify | 84 | 2020/05/17 14:47 | |
<CA> segfaults | 77 | 2020/05/17 14:55 |
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
title: Suspicious Keyboard Layout Load | |
description: Detects the keyboard preload installation with a suspicious keyboard layout, e.g. Chinese, Iranian or Vietnamese layout load in user session on systems maintained by US staff only | |
references: | |
- https://renenyffenegger.ch/notes/Windows/registry/tree/HKEY_CURRENT_USER/Keyboard-Layout/Preload/index | |
author: Florian Roth | |
date: 2019/10/12 | |
logsource: | |
product: windows | |
service: sysmon | |
definition: 'Requirements: Sysmon config that monitors \Keyboard Layout\Preload subkey of the HKLU hives - see https://github.com/SwiftOnSecurity/sysmon-config/pull/92/files' |
NewerOlder