Skip to content

Instantly share code, notes, and snippets.

Process: Chocolat [29947]
Path: /Users/USER/Downloads/Chocolat.app/Contents/MacOS/Chocolat
Identifier: com.chocolatapp.Chocolat
Version: 2.1 (2.1)
Code Type: X86-64 (Native)
Parent Process: launchd [155]
Responsible: Chocolat [29947]
User ID: 501
Date/Time: 2013-12-10 02:03:01.690 -0600
module SuperSillyHash
def []=(key, value)
super(key, value.to_i)
end
end
hash = {}
hash.extend(SuperSillyHash)
hash[:test] = '20'
var test: UIView = nil
(define (square x)
(* x x))
type file;
app (file o) simulate_app ()
{
simulate stdout=filename(o);
}
foreach i in [1:10] {
string fname=strcat("output/sim_", i, ".out");
file f <single_file_mapper; file=fname>;
extension NSFileManager {
func fileExists(path: String) -> (Bool, isDirectory: Bool) {
var dir: ObjCBool = true
let status = self.fileExistsAtPath(path, isDirectory: &dir)
return (status, dir.boolValue)
}
}
NSFileManager.defaultManager().fileExists("/Applications").isDirectory
App = Application.currentApplication();
App.includeStandardAdditions = true
App.say("Hello from Dan's JavaScript automation!!!");
rm -rf ~/Library/Preferences/com.apple.appstore.plist
rm -rf ~/Library/Preferences/com.apple.storeagent.plist
rm -rf ~/Library/Preferences/ByHost/*
import sys
n = None
try:
n = int(sys.argv[1])
except (ValueError, IndexError) as e:
pass # Ignore error here
if (len(sys.argv) == 1) or (n is None):
@s3itz
s3itz / base.html
Last active August 29, 2015 14:15 — forked from rtuita23/traceback
Error with macros
{% from "macros.html" import nav_link with context %}
<!DOCTYPE html>
<html>
<head>
<title>Flask Template Example</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
div#main {
max-width: 500px;
padding: 20px;