Create a new tmux session:
tmux new-session -s my-session # launch `top`, `htop`, or anything that will regularly updates, then detachStream your session:
| # Check if this is the very first time that this script is running | |
| if ([ ! -f /root/.not-a-new-instance.txt ]) then | |
| newEC2Instance=true | |
| fi | |
| if ([ $newEC2Instance ]) then | |
| whoami | |
| cd /tmp |
| import UIKit | |
| import Foundation | |
| import XCPlayground | |
| XCPSetExecutionShouldContinueIndefinitely() | |
| class RemoteAPI { | |
| func getData(completionHandler: ((NSArray!, NSError!) -> Void)!) -> Void { | |
| let url: NSURL = NSURL(string: "http://itunes.apple.com/search?term=Turistforeningen&media=software") | |
| let ses = NSURLSession.sharedSession() |
| # This is an example of the Stack Exchange Tier 1 HAProxy config | |
| # The only things that have been changed from what we are running are: | |
| # 1. User names have been removed | |
| # 2. All Passwords have been remove | |
| # 3. IPs have been changed to use the example/documentation ranges | |
| # 4. Rate limit numbers have been changed to randome numbers, don't read into them | |
| userlist stats-auth | |
| group admin users $admin_user | |
| user $admin_user insecure-password $some_password |
These rules are adopted from the AngularJS commit conventions.
| // Playground - noun: a place where people can play | |
| import UIKit | |
| class ViewController: UIViewController ,UITableViewDelegate, UITableViewDataSource | |
| { | |
| var tableView: UITableView! | |
| var items: NSMutableArray! | |
| override func viewDidLoad() { | |
| super.viewDidLoad() |
THIS GIST WAS MOVED TO TERMSTANDARD/COLORS REPOSITORY.
PLEASE ASK YOUR QUESTIONS OR ADD ANY SUGGESTIONS AS A REPOSITORY ISSUES OR PULL REQUESTS INSTEAD!
| #!/usr/bin/env bash | |
| # MIT © Sindre Sorhus - sindresorhus.com | |
| # git hook to run a command after `git pull` if a specified file was changed | |
| # Run `chmod +x post-merge` to make it executable then put it into `.git/hooks/`. | |
| changed_files="$(git diff-tree -r --name-only --no-commit-id ORIG_HEAD HEAD)" | |
| check_run() { | |
| echo "$changed_files" | grep --quiet "$1" && eval "$2" |
| # required: ffmpeg (e.g. from homebrew), terminal-notifier from https://github.com/alloy/terminal-notifier | |
| # you can schedule this with launchd to run e.g. weekly | |
| # Specify in seconds how long the script should record (default here is 1 hour). | |
| seconds=3600 | |
| # Date format for the recording file name | |
| DATE=`date "+%d-%m-%y_%H-%M"` | |
| # start ffmpeg recording |
| (function (root) { | |
| var type = function (o) { | |
| // handle null in old IE | |
| if (o === null) { | |
| return 'null'; | |
| } | |
| // handle DOM elements |