Skip to content

Instantly share code, notes, and snippets.

@albertmenglongli
albertmenglongli / Calculator.py
Created December 18, 2014 08:38
Pythonista Scripts
# coding: utf-8
# Calculator
from __future__ import division
import ui
import clipboard
from console import hud_alert
shows_result = False
@mikermcneil
mikermcneil / disabling-macosx-notification-center.md
Last active January 26, 2026 04:01
Disable/Enable Notification Center (MacOS X)

Toggle MacOS X Notification Center on or off

This gist is to remind me (and anyone else who it helps) how to quickly disable and re-enable Notification Center.

Set Up Bash Aliases

Installation

  1. Open your terminal (<⌘ + ␣ (spacebar)>, then type "terminal", then press <↩ (enter)>).
@jinie
jinie / read.py
Created July 5, 2011 18:25
Read binary file in python and print hex output
#!/usr/bin/python
import sys,getopt
filename = None
blocksize = 1024
opts,args = getopt.getopt(sys.argv[1:],'f:b:')
for o,a in opts:
if o == '-f':