most of these require logout/restart to take effect
# Enable character repeat on keydown
defaults write -g ApplePressAndHoldEnabled -bool false
# Set a shorter Delay until key repeat
from __future__ import print_function | |
""" | |
Utilities for 256 color support in terminals. | |
Adapted from: | |
http://stackoverflow.com/questions/1403353/256-color-terminal-library-for-ruby | |
The color palette is indexed as follows: | |
0-15: System colors |
#!/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 |
import re | |
from ply import lex, yacc | |
from ply.lex import TOKEN | |
import pyparsing as pp | |
# First, let's define a pyparsing parser for JSON. | |
class JSONPyParsing(object): | |
# pylint: disable-msg=W0104,E0213 |
"""Podcast Feed Generator | |
Generate an podcast RSS feed for a set of media in a directory. | |
Use the list-extensions argument to see the list of supported extensions. You can add custom extensions using | |
Usage: | |
podcastgen.py gen <directory> --title=<podcast-title> --link=<podcast-link> --desc=<description> [--output=<rss-feed-file>] [--feed-link=<feed-url>] [--id=<podcast-id>] [--logo=<image_file>] [--category=<itunes-category> [--subcategory=<itunes-category>]] [--language=<language>] [--use-extension=<ext>] | |
podcastgen.py list-categories | |
podcastgen.py list-extensions | |
podcastgen.py -h | --help |
import Foundation | |
import UIKit | |
// Usage Examples | |
let shadowColor = Color.shadow.value | |
let shadowColorWithAlpha = Color.shadow.withAlpha(0.5) | |
let customColorWithAlpha = Color.custom(hexString: "#123edd", alpha: 0.25).value | |
enum Color { | |
import UIKit | |
import MobileCoreServices | |
let image = UIImage() // your actual image | |
let itemProvider = NSItemProvider() | |
itemProvider.registerDataRepresentation(forTypeIdentifier: kUTTypeJPEG as String, visibility: .all) { (completionBlock) -> Progress? in | |
let unitsOfWork = 10 + Int64(arc4random_uniform(UInt32(10))) // 10 - 19 units | |
let progress = Progress.discreteProgress(totalUnitCount: unitsOfWork) |
{ | |
var SQL = { | |
listToString: function(x, xs) { | |
return [x].concat(xs).join(""); | |
} | |
}; | |
} | |
Start | |
= Stmt |