-
Open a browser
# start an instance of firefox with selenium-webdriver driver = Selenium::WebDriver.for :firefox # :chrome -> chrome # :ie -> iexplore
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
@echo off | |
:: BatchGotAdmin | |
:CheckPrivileges | |
NET FILE 1>NUL 2>NUL | |
if '%errorlevel%' == '0' ( goto gotAdmin ) else ( goto getAdmin ) | |
:getAdmin | |
echo This script requires administrator privileges. Please confirm the UAC prompt. | |
powershell -Command "Start-Process '%~f0' -Verb runAs" | |
exit /b |
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
#!/usr/bin/env ruby | |
require 'csv' | |
require 'json' | |
if ARGV.size != 2 | |
puts 'Usage: csv_to_json input_file.csv output_file.json' | |
puts 'This script uses the first line of the csv file as the keys for the JSON properties of the objects' | |
exit(1) | |
end |
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 -e | |
clear | |
echo "============================================" | |
echo "WordPress Install Script" | |
echo "============================================" | |
echo "Database Name: " | |
read -e dbname | |
echo "Database User: " | |
read -e dbuser | |
echo "Database Password: " |
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
<!-- | |
...................................................................................... | |
...................................................................................... | |
...................................................................................... | |
................................. ................................. | |
................................. o--o o-o ................................. | |
................................. | | | ................................. | |
................................. O-o o-o ................................. | |
................................. | | | ................................. | |
................................. o o-o ................................. |
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
batman = true | |
while batman | |
puts "forever" | |
end |
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 | |
NOW=`/bin/date +"%m%d%Y-%H%M%S"` | |
if [[ "$?" != "0" ]]; then | |
NOW="UNKNOWN_DATE" | |
fi | |
mysqldump -h hostname -u username -pPassword databasename > /opt/databasebackup/$NOW.sql | |
if [[ "$?" != "0" ]]; then | |
echo "$0: backup failed with error code $?" | |
fi |