- Open the Terminal Application
- Type in
sudo -i
and type in your Mac Administrator account password.sudo
gives you root level or administrator level privileges.
dsconfigad -show
boot2docker ssh "echo $'EXTRA_ARGS=\"--registry-mirror=<DOCKER_REGISTRY>\"' | sudo tee -a /var/lib/boot2docker/profile && sudo /etc/init.d/docker restart" |
// | |
// NSData+HexString.swift | |
// Cybertk | |
// | |
// Created by Quanlong He on 8/14/15. | |
// Copyright © 2015 Quanlong He. All rights reserved. | |
// | |
import Foundation |
// | |
// UInt32+IPv4String.swift | |
// Cybertk | |
// | |
// Created by Quanlong He on 8/14/15. | |
// Copyright © 2015 Quanlong He. All rights reserved. | |
// | |
import Foundation |
// See http://stackoverflow.com/questions/3124080/app-store-link-for-rate-review-this-app | |
func jumpToAppStore(appID: String) { | |
let url = "itms-apps://itunes.apple.com/app/id\(appID)" | |
UIApplication.sharedApplication().openURL(NSURL(string: url)!) | |
} |
// | |
// UITableView+ClearSelections.swift | |
// Cybertk | |
// | |
// Created by Quanlong He on 8/20/15. | |
// Copyright © 2015 Quanlong He. All rights reserved. | |
// | |
import Foundation |
NSNotificationCenter.defaultCenter().addObserverForName(UITextFieldTextDidChangeNotification, object: textField, queue: nil, usingBlock: { note in | |
print("UITextFieldTextDidChangeNotification") | |
}) |
sudo -i
and type in your Mac Administrator account password. sudo
gives you root level or administrator level privileges.dsconfigad -show
{url:'stun:stun01.sipphone.com'}, | |
{url:'stun:stun.ekiga.net'}, | |
{url:'stun:stun.fwdnet.net'}, | |
{url:'stun:stun.ideasip.com'}, | |
{url:'stun:stun.iptel.org'}, | |
{url:'stun:stun.rixtelecom.se'}, | |
{url:'stun:stun.schlund.de'}, | |
{url:'stun:stun.l.google.com:19302'}, | |
{url:'stun:stun1.l.google.com:19302'}, | |
{url:'stun:stun2.l.google.com:19302'}, |
#!/bin/sh | |
O=mp4s | |
videos=$(find ./videos -iname "*.avi") | |
for f in $videos; do | |
o="$O/$(basename ${f%%.avi}).mp4" | |
if [[ ! -f "$o" ]]; then | |
cmd="HandBrakeCLI -i "$f" -o "$O/$(basename ${f%%.avi}).mp4"" |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000