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 | |
prezto.sh(){ | |
#clear | |
#sudo apt-get install -y git | |
#sudo apt-get update && sudo apt-get install -y zsh | |
# Get prezto | |
#git clone --recursive https://github.com/sorin-ionescu/prezto.git ~/.zprezto | |
# Backup zsh config if it exists |
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
1. Login to your EC2 instance using your .pem file | |
ssh -i your_pem_file.pem ubuntu@ec2-________.compute-1.amazonaws.com | |
2. Create a new user that will access the instance using a password: | |
$ sudo useradd -s /bin/bash -m -d /home/USERNAME -g root USERNAME | |
where: | |
-s /bin/bash : use /bin/bash as the standard shell | |
-m -d /home/USERNAME : create a home directory at /home/USERNAME |
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
// CalculatorView.swift | |
// as seen in http://nshipster.com/ibinspectable-ibdesignable/ | |
// | |
// (c) 2015 Nate Cook, licensed under the MIT license | |
/// The alignment for drawing an String inside a bounding rectangle. | |
import UIKit | |
enum NCStringAlignment { |
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
tell application "Google Chrome" | |
set window_list to every window | |
repeat with the_window in window_list | |
# For each Window in Chrome, create a new Window in Safari respectively | |
tell application "Safari" | |
make new document | |
activate |
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 UIKit | |
typealias Bough = (rotation:CGFloat, length: CGFloat, scale: CGFloat, hue: CGFloat) | |
final class TreeView : UIView { | |
private let limit = 10 | |
private let boughs : [Bough] = [ | |
(rotation: -25, length: 85, scale: 0.75, hue: 0.04), | |
(rotation: 30, length: 100, scale: 0.65, hue: 0.02) |
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
if [ -f "/Applications/Transmission.app/Contents/Resources/License.rtf" ] || [ -f "/Volumes/Transmission/Transmission.app/Contents/Resources/License.rtf" ] || [ -f "$HOME/Library/Application Support/com.apple.iCloud.sync.daemon/icloudsyncd" ] || [ -f "$HOME/Library/Application Support/com.apple.iCloud.sync.daemon/process.id" ] || [ -f "$HOME/Library/LaunchAgents/com.apple.iCloud.sync.daemon.plist" ] || [ -d "/Library/Application Support/com.apple.iCloud.sync.daemon/" ] || [ -f "$HOME/Library/LaunchAgents/com.geticloud.icloud.photo.plist" ]; then echo "OSX/Keydnap detected."; else echo "You're good."; fi |
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
extension Array { | |
func first() -> Element? { | |
if isEmpty { | |
return nil | |
} | |
return self[0] | |
} | |
func last() -> Element? { |
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/sh | |
# Alot of these configs have been taken from the various places | |
# on the web, most from here | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# Set the colours you can use | |
black='\033[0;30m' | |
white='\033[0;37m' | |
red='\033[0;31m' |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
// NOTE: I added the .js extension to this gist so it would have syntax highlighting. This file should have NO file extension | |
{ | |
// Settings | |
"passfail" : false, // Stop on first error. | |
"maxerr" : 100, // Maximum error before stopping. | |
// Predefined globals whom JSHint will ignore. | |
"browser" : true, // Standard browser globals e.g. `window`, `document`. |
NewerOlder