Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//! 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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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-". | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Foundation | |
extension String { | |
/// Return last path component. | |
public var lastPathComponent: String { | |
return (self as NSString).lastPathComponent | |
} | |
} | |
/// Write a message to the system log. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
"""Deletes all tweets in your 'tweets.csv' archive older than 90 days. | |
You can obtain your 'tweets.csv' archive by going to | |
<https://twitter.com/settings/account>, requesting your archive, | |
downloading it, and then extracting the 'tweets.csv' file. | |
""" | |
from __future__ import print_function |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
"""Deletes all tweets older than 90 days. | |
""" | |
from __future__ import print_function | |
# Dependencies: pip install twitter python-dateutil | |
import twitter | |
import dateutil.parser |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env awk -f | |
# Processes PEM output to print certificate expiration information. | |
# | |
# Example: Print expiration dates for all certificates on macOS | |
# | |
# security find-certificate -a -p | awk -f cert_expire.awk | |
# | |
# Example: Print expiration dates for all "iPhone Developer" certificates on macOS | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# Dependency: pip3 install twitter | |
import twitter | |
# Go to http://apps.twitter.com/, create an app, and fill in these values: | |
consumer_key = 'www' | |
consumer_secret = 'xxx' | |
access_token = 'yyy' | |
access_token_secret = 'zzz' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# This script downloads the source to Donald Knuth's "TeX: The Program" | |
# and builds a PDF. | |
# | |
# Requires curl and a TeX distribution. | |
curl http://tug.org/texlive/devsrc/Build/source/texk/web2c/tex.web -o tex.web | |
weave tex.web | |
tex tex.tex |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import sys | |
letterValues = { | |
'M': 1000, | |
'D': 500, | |
'C': 100, | |
'L': 50, | |
'X': 10, |