Skip to content

Instantly share code, notes, and snippets.

View ebridges's full-sized avatar
🛠️
Fixing things

Edward Q. Bridges ebridges

🛠️
Fixing things
View GitHub Profile
@mnesarco
mnesarco / objects.py
Created July 23, 2020 16:54
Enhanced python properties with some metaprog.
# file: objects.py
# Copyright 2020 Frank David Martínez Muñoz (mnesarco)
# License: MIT
from typing import Union
__all__ = ('self_properties', 'properties')
def self_properties(self, scope: dict, exclude=(), save_args: bool = False):
@kopischke
kopischke / markdown2evernote.rb
Created June 5, 2011 16:57
OS X service scripts
#!/usr/bin/env ruby -wKU
# Adapted from Brett Terpstra’s original “Markdown to Evernote” service (http://brettterpstra.com/a-better-os-x-system-service-for-evernote-notes-with-multimarkdown/)
# Martin Kopischke 2011 – License: Creative Commons Attribution Share-Alike (CC BY-SA) 3.0 Unported (http://creativecommons.org/licenses/by-sa/3.0/)
# Changes: – create only one Evernote note per (Multi)Markdown input passed (instead of one per line)
# – do not choke on shell escape characters (use Tempfile instead of shell pipe for osascript)
# – default to MultiMarkdown 3 executable (instead of MMD 2 Perl script)
# – make smart typography processing optional (set SMARTY to 'false' to bypass processing;
# note smart typography cannot be disabled in MMD 3.0 and 3.0.1
# – handle both smart typography processing scripts (ie. SmartyPants.pl)
@cdata
cdata / xcodeinstaller.sh
Created February 9, 2011 01:02
Snippet for unattended installation of XCode
#!/bin/bash
# This snippet should hypothetically allow a totally unattended
# installation of Apple's XCode. After prompting for credentials,
# the script simulates a login, begins a download and subsequently
# mounts the disk image and installs XCode to the default location.
echo -n "ADC login: "
read login
echo -n "ADC password: "