First off, the Terminal application that OS X comes with is great, but iTerm is better.
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 Foundation | |
extension NSString { | |
/** | |
http://stackoverflow.com/questions/800123/what-are-best-practices-for-validating-email-addresses-in-objective-c-for-ios-2 | |
RFC 2822 http://tools.ietf.org/html/rfc2822 | |
*/ | |
func isEmail() -> Bool { | |
let sRegex = "(?:[a-z0-9!#$%\\&'*+/=?\\^_`{|}~-]+(?:\\.[a-z0-9!#$%\\&'*+/=?\\^_`{|}~-]+)*|\"(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21\\x23-\\x5b\\x5d-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])*\")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21-\\x5a\\x53-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])+)\\])" |
(wherever it says url.com, use your server's domain or IP)
Login to new server as root, then add a deploy user
sudo useradd --create-home -s /bin/bash deploy
sudo adduser deploy sudo
sudo passwd deploy
And Update the new password
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
#--------------------------------------------------------------------------------------------------------------------------------------- | |
# | |
# Author: Kyle Brumm | |
# Description: File used to hold Bash configuration, aliases, functions, completions, etc... | |
# | |
# Sections: | |
# 1. ENVIRONMENT SETUP | |
# 2. MAKE TERMINAL BETTER | |
# 3. FOLDER MANAGEMENT | |
# 4. MISC ALIAS' |
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
// No Security | |
{ | |
"rules": { | |
".read": true, | |
".write": true | |
} | |
} |
brew install git bash-completion
Configure things:
git config --global user.name "Your Name"
git config --global user.email "you@example.com"
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
Language | Name | Quality | Identifier | Class | |
---|---|---|---|---|---|
ar-SA | Maged | Default | com.apple.ttsbundle.Maged-compact | AVSpeechSynthesisVoice | |
cs-CZ | Zuzana | Default | com.apple.ttsbundle.Zuzana-compact | AVSpeechSynthesisVoice | |
da-DK | Sara | Default | com.apple.ttsbundle.Sara-compact | AVSpeechSynthesisVoice | |
de-DE | Anna | Default | com.apple.ttsbundle.Anna-compact | AVSpeechSynthesisVoice | |
de-DE | Helena | Default | com.apple.ttsbundle.siri_female_de-DE_compact | AVSpeechSynthesisVoice | |
de-DE | Martin | Default | com.apple.ttsbundle.siri_male_de-DE_compact | AVSpeechSynthesisVoice | |
el-GR | Melina | Default | com.apple.ttsbundle.Melina-compact | AVSpeechSynthesisVoice | |
en-AU | Catherine | Default | com.apple.ttsbundle.siri_female_en-AU_compact | AVSpeechSynthesisVoice | |
en-AU | Gordon | Default | com.apple.ttsbundle.siri_male_en-AU_compact | AVSpeechSynthesisVoice |
Disclaimer: This piece is written anonymously. The names of a few particular companies are mentioned, but as common examples only.
This is a short write-up on things that I wish I'd known and considered before joining a private company (aka startup, aka unicorn in some cases). I'm not trying to make the case that you should never join a private company, but the power imbalance between founder and employee is extreme, and that potential candidates would
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
for (var i=1; i <= 20; i++) | |
{ | |
if (i % 15 == 0) | |
console.log("FizzBuzz"); | |
else if (i % 3 == 0) | |
console.log("Fizz"); | |
else if (i % 5 == 0) | |
console.log("Buzz"); | |
else | |
console.log(i); |
OlderNewer