# Get latest from MongoDB website
$ curl -O https://fastdl.mongodb.org/osx/mongodb-osx-x86_64-3.4.6.tgz
$ tar -zxvf mongodb-osx-x86_64-3.4.6.tgz
$ mkdir -p mongodb
$ cp -R -n mongodb-osx-x86_64-3.4.6/ mongodb
$ sudo mv mongodb /usr/local
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
cd /tmp && \ | |
wget http://au1.php.net/distributions/php-5.6.12.tar.gz -O php-current.tar.gz > /dev/null 2>&1 | |
mkdir php-current && tar -zxvf php-current.tar.gz -C /tmp/php-current --strip-components=1 > /dev/null 2>&1 && \ | |
cd php-current | |
./configure \ | |
--with-apxs2=/usr/sbin/apxs \ | |
--with-mysql \ | |
--with-mysqli \ |
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 dateFormatter = DateFormatter() | |
let enUSPosixLocale = Locale(identifier: "en_US_POSIX") | |
dateFormatter.locale = enUSPosixLocale | |
dateFormatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ssZZZZZ" | |
let createdDate = dateFormatter.string(from: Date()) |
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
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions |
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 Jobinhood | |
BV_GREEN_TICK='\e[0;32m [✔] \e[0m'; | |
BV_RED_CROSS='\e[0;91m [✗] \e[0m'; | |
BV_YELLOW_DOT='\e[0;33m [.] \e[0m'; | |
BV_YELLOW_DOTS='\e[0;33m ... \e[0m'; | |
# Helper to run sudo commands for us by asking | |
# sudo password if needed | |
sudo_needed() { |
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
# Start Selenium server | |
start_selenium | |
# stop Selenium server | |
stop_selenium | |
# Status for Selenium server | |
status_selenium | |
status_selenium -v |
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
# Start Selenium | |
sudo launchctl load /Library/LaunchDaemons/org.seleniumhq.selenium.plist | |
# Stop Selenium | |
sudo launchctl unload /Library/LaunchDaemons/org.seleniumhq.selenium.plist | |
# Is it working? | |
ps -ef | grep selenium | grep java | grep chromedriver | grep -v grep | grep -c selenium | |
# Will show 0 if selenium is not running, and 1 otherwise |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Label</key> | |
<string>org.seleniumhq.selenium</string> | |
<key>UserName</key> | |
<string>_selenium</string> | |
<key>ProgramArguments</key> | |
<array> |
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
# Create plist file in /Library/LaunchDaemons | |
vi /Library/LaunchDaemons/org.seleniumhq.selenium.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
# Start Selenium | |
java -Dwebdriver.chrome.driver=/usr/local/selenium/drivers/chromedriver -jar /usr/local/selenium/bin/selenium-server-standalone-3.8.1.jar | |
# Make sure it works | |
ps -ef | grep selenium | grep -v grep |
NewerOlder