# 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 hidden or 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
# Make sure user _selenium does not already exist | |
sudo dscl . -read /Users/_selenium |
This file contains hidden or 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
# Show the last 15 group id created | |
dscacheutil -q group | grep gid | awk ‘{print $2}’ | sort -n | tail -n 5 |
This file contains hidden or 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 folders | |
sudo mkdir -p /usr/local/selenium/bin /usr/local/selenium/drivers | |
# Donwload latest selenium server .jar file | |
cd /usr/local/selenium/bin | |
wget http://selenium-release.storage.googleapis.com/3.8/selenium-server-standalone-3.8.1.jar | |
# Download latest chromedriver | |
cd /usr/local/selenium/drivers | |
wget https://chromedriver.storage.googleapis.com/2.35/chromedriver_mac64.zip |
This file contains hidden or 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
# Returns 1 if java installed, 0 otherwise | |
which java | grep -c java |
This file contains hidden or 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
- run: | |
name: Build Success | |
when: on_success | |
command: | | |
echo "I am executed when the build succeeds..." | |
- run: | |
name: Build Failed | |
when: on_fail | |
command: | | |
echo "I am executed when the build fails..." |
This file contains hidden or 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
# wpa_supplicant | |
/sbin/wpa_supplicant -s -B -P /run/wpa_supplicant.wlan0.pid -i wlan0 -D nl80211,wext -c /etc/wpa_supplicant/wpa_supplicant.conf | |
# | |
# dhclient | |
# | |
# Configure one or more network interfaces using the Dynamic Host Configuration Protocol, | |
# BOOTP Protocol, or if these protocols fail, by statically assigning an address. |
This file contains hidden or 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 | |
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin | |
# 1. Add virtual interface | |
echo "-> Adding Virtual Interface wlan1" | |
iw dev wlan0 interface add wlan1 type __ap | |
if [ $? -eq 0 ]; then | |
echo "OK" |
This file contains hidden or 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 | |
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin | |
# Stop hostapd | |
# service hostapd stop | |
/etc/init.d/hostapd stop | |
# Bring wlan1 interface down | |
# ifdown wlan1 |
This file contains hidden or 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()) |