Skip to content

Instantly share code, notes, and snippets.

View dvcrn's full-sized avatar
💫

David dvcrn

💫
View GitHub Profile

Coding Rules and Instructions

  1. Test-Driven Development (TDD) with pytest: Always write a failing test before writing implementation code (Red-Green-Refactor). Use pytest and pytest-fixtures for test setup, execution, and teardown.
  2. KISS (Keep It Simple, Stupid): Favor the simplest solution that meets the requirements.
  3. DRY (Don't Repeat Yourself): Avoid code duplication. Extract reusable logic into functions or classes.
  4. Standard Libraries and Tools: Utilize standard Python libraries (like datetime for date/time, requests for HTTP requests, and logging) and external libraries, including BeautifulSoup4 for HTML parsing, to avoid reinventing the wheel. Favor well-maintained and widely-used libraries.
  5. YAGNI (You Ain't Gonna Need It): Don't implement features or functionality unless they are currently required.
  6. SOLID Principles & Extensibility: Adhere to SOLID principles, promoting maintainability, testability, and future extension. Consider potential future requi
@dergachev
dergachev / GIF-Screencast-OSX.md
Last active April 20, 2025 21:14
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@brandonb927
brandonb927 / osx-for-hackers.sh
Last active April 24, 2025 05:34
OSX for Hackers: Yosemite/El Capitan Edition. This script tries not to be *too* opinionated and any major changes to your system require a prompt. You've been warned.
#!/bin/sh
###
# SOME COMMANDS WILL NOT WORK ON macOS (Sierra or newer)
# For Sierra or newer, see https://github.com/mathiasbynens/dotfiles/blob/master/.macos
###
# Alot of these configs have been taken from the various places
# on the web, most from here
# https://github.com/mathiasbynens/dotfiles/blob/5b3c8418ed42d93af2e647dc9d122f25cc034871/.osx
@chmurph2
chmurph2 / copyURLPlusSafari.scpt
Created February 26, 2009 01:12
In Safari, this applescript copies the title and URL of the current tab to the clipboard.
-- In Safari, this copies the Title and URL of the current tab to the clipboard.
-- Save the script in ~/Library/Scripts/Applications/Safari
-- Using QuickSilver, I assign a trigger to this script using the hotkey ⌥-C (option c), with the scope of the trigger limited to Safari.
-- Inspired by CopyURL + (http://copyurlplus.mozdev.org/)
-- Christopher R. Murphy
tell application "Safari"
set theURL to URL of front document
set theTitle to name of front document
set the clipboard to theTitle & return & theURL as string