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
# <TULSI> LLDB bridge [: | |
# This was autogenerated by Tulsi in order to modify LLDB source-maps at build time. | |
command source /Users/gregoryvit/.lldbinit-tulsiproj | |
# ]: <TULSI> LLDB bridge | |
command script import /usr/local/opt/chisel/libexec/fbchisellldb.py | |
command script import ~/Development/lldb/keychain.py | |
command script import ~/Development/lldb/getjson.py |
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
SCRIPTID=my.awesome.script.identifier | |
ERRORLOGPATH=${HOME}/launchd.${SCRIPTID}.stderr.log | |
HOURS=9 | |
MINUTES=0 | |
SCRIPT_TO_RUN_PATH=`pwd`/run.sh | |
install: | |
cp ./launchd.plist ~/Library/LaunchAgents/${SCRIPTID}.plist | |
launchctl load ~/Library/LaunchAgents/${SCRIPTID}.plist |
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 subprocess | |
import json | |
class SwiftItemsExtractor: | |
SOURCEKIT_SUBSCTRUCTURE_KEY = "key.substructure" | |
SOURCEKIT_OFFSET_KEY = "key.offset" | |
SOURCEKIT_LENGTH_KEY = "key.length" | |
SOURCEKIT_COMMENT_KEY = "key.doc.comment" | |
SOURCEKIT_NAME_KEY = "key.name" |
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 subprocess | |
import os | |
def cb_paste(use_bytes=False): | |
""" | |
Returns the data from macOS pastboard | |
""" | |
p = subprocess.Popen(['pbpaste'], | |
stdout=subprocess.PIPE, | |
stderr=subprocess.PIPE) |
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
from simple_cacher import cacheable_result | |
@cacheable_result('temp.p', needs_to_cache=False) | |
def get_data(): | |
# Some data fetching operation | |
return [1, 2, 3, 4] |
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 | |
echo -n "$(pbpaste)" | iconv -f utf-8 -t utf-32be | xxd -p | sed 's/^0/0x/' | xargs printf 'U+%04X\n' |
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
let view = UIView(frame: CGRect(x: 0.0, y: 0.0, width: 480.0, height: 480.0)) | |
view.backgroundColor = UIColor.white | |
// Body text | |
let bodyStyle = TextStyle( | |
fontSize: 16.0, | |
weight: UIFontWeightRegular, | |
lineHeight: 24.0, |
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
//: Playground - noun: a place where people can play | |
import UIKit | |
import PlaygroundSupport | |
class ViewController:UIViewController{ | |
lazy var webView: UIWebView = UIWebView(frame: self.view.bounds) | |
override func viewDidLoad() { |