View Makefile
# Makefile for GraphViz files in this directory | |
# | |
# `make all` - build all targets | |
# `make clean` - delete all targets | |
# `make listtargets` - print list of all targets | |
# `brew install graphviz`, or download from <http://graphviz.org/download/> | |
# to get the `dot` utility. | |
DOT?=dot |
View Play White Noise.applescript
-- Choose a white noise generator and play. | |
-- | |
-- Requires installation of SoX <http://sox.sourceforge.net> | |
-- With Homebrew: brew install sox | |
-- | |
-- Starts a background process. Kill it with command "killall play" or by running the "Stop Playing" script. | |
set theSynth to ¬ | |
choose from list {"pinknoise", "whitenoise", "brownnoise"} ¬ | |
with prompt ¬ |
View FontsView.swift
import SwiftUI | |
import UIKit | |
/// Displays all available fonts in a vertically scrolling view. | |
struct FontsView: View { | |
private static let fontNames: [String] = { | |
var names = [String]() | |
for familyName in UIFont.familyNames { | |
names.append(contentsOf: UIFont.fontNames(forFamilyName: familyName)) | |
} |
View DecodeGlass.swift
import Foundation | |
let codes: [UInt8] = [ | |
0b01101001, | |
0b01101100, | |
0b01101111, | |
0b01110110, | |
0b01100101, | |
0b01111001, | |
0b01101111, |
View Set Terminal Background Colors.applescript
-- Set background colors of terminal windows to different colors, for easier identification | |
tell application "Terminal" | |
set window_colors to {¬ | |
{8192, 0, 0}, ¬ | |
{0, 8192, 0}, ¬ | |
{0, 0, 8192}, ¬ | |
{4096, 4096, 0}, ¬ | |
{0, 4096, 4096}, ¬ | |
{4096, 0, 4096}, ¬ |
View Hello.applescript
tell application "SpeechRecognitionServer" | |
set possibleResponses to {¬ | |
"hello", ¬ | |
"good bye", ¬ | |
"good morning", ¬ | |
"good afternoon", ¬ | |
"good night", ¬ | |
"nice to meet you", ¬ | |
"pleased to meet you", ¬ | |
"how are you", ¬ |
View Unfollow_Quiet_Accounts.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View lunar.rs
//! Translation of | |
//! <http://www.cs.brandeis.edu/~storer/LunarLander/LunarLander/LunarLanderListing.jpg> | |
//! by Jim Storer from FOCAL to Rust. | |
use std::error::Error; | |
use std::io; | |
use std::io::prelude::*; | |
use std::marker::{Send, Sync}; | |
use std::process; | |
use std::str::FromStr; |
View make-ios-app-icon.sh
#!/bin/bash | |
# | |
# Given a source image, create icons in all sizes needed for an iOS app icon. | |
# See <https://developer.apple.com/library/ios/qa/qa1686/_index.html> for details. | |
# | |
# First (required) argument is path to source file. | |
# | |
# Second (optional) argument is the prefix to be used for the output files. | |
# If not specified, defaults to "Icon-". | |
# |
View log.swift
import Foundation | |
extension String { | |
/// Return last path component. | |
public var lastPathComponent: String { | |
return (self as NSString).lastPathComponent | |
} | |
} | |
/// Write a message to the system log. |
NewerOlder