A few ways of checking code signatures on OS X.
$ /usr/bin/codesign --verify --deep --verbose /Applications/Xcode.app
/Applications/Xcode.app: valid on disk
/Applications/Xcode.app: satisfies its Designated Requirement
import Darwin | |
let handle = dlopen("/usr/lib/libc.dylib", RTLD_NOW) | |
let sym = dlsym(handle, "random") | |
let functionPointer = UnsafeMutablePointer<() -> CLong>(sym) | |
let result = functionPointer.memory() | |
println(result) |
import Foundation | |
import ObjectiveC.runtime | |
let myString = "foobar" as NSString | |
println(myString.description) | |
let myBlock : @objc_block (AnyObject!) -> String = { (sself : AnyObject!) -> (String) in | |
"✋" | |
} |
#!/usr/bin/env python | |
import cookielib | |
import json | |
import mechanize | |
##### | |
GOOGLE_USER = 'you@gmail.com' | |
GOOGLE_PASS = 'your-password' | |
##### |
$ strings /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/sourcekitd.framework/Versions/Current/XPCServices/SourceKitService.xpc/Contents/MacOS/SourceKitService|grep source.lang.swift
source.lang.swift.keyword
source.lang.swift.pattern
source.lang.swift.syntaxtype.argument
source.lang.swift.syntaxtype.parameter
source.lang.swift.attribute.availability
source.lang.swift.decl.extension
source.lang.swift.decl.var.parameter
source.lang.swift.stmt.brace
#!/usr/bin/env swift | |
#if os(Linux) | |
import Glibc | |
let sin_zero = (UInt8(0),UInt8(0),UInt8(0),UInt8(0),UInt8(0),UInt8(0),UInt8(0),UInt8(0)) | |
let sock_stream = Int32(SOCK_STREAM.rawValue) | |
#else | |
import Darwin.C |
#!/bin/sh | |
## | |
# Git diff for SQLite databases | |
## | |
if [ -z "$DIFF" ] | |
then | |
DIFF=diff | |
fi |
#!/bin/sh | |
# | |
## Strip debug symbol from universal static libraries | |
# | |
if [ -z "$1" ] | |
then | |
echo "$0 library" | |
exit 1 |
{ | |
"formatVersion": "1.0", | |
"generatedAt": "2021-05-20T23:27:39Z", | |
"generatedBy": { | |
"name": "Boris Buegling" | |
}, | |
"keywords": [ | |
"cs-307" | |
], | |
"name": "CS 307", |
{ | |
"formatVersion": "1.0", | |
"generatedAt": "2021-05-13T04:40:48Z", | |
"generatedBy": { | |
"name": "Boris Buegling" | |
}, | |
"keywords": [ | |
"wwdc21" | |
], | |
"name": "WWDC21 Demo Collection", |