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
# To run the restart-all Windows Scheduled Task from the command line (either cmd or Cygwin): | |
(windows box)$ schtasks /run /tn restart-all | |
To run that command remotely from a linux box: | |
(linux box)$ ssh windows-user@windows-machine "schtasks /run /tn restart-all" | |
# Ensure that you have setup public key authentication on the windows box, to allow this command to work without password entry | |
# Jenkins can be scheduled to execute the above command to allow Windows Selenium instances to be restarted between builds (so as not to clash with running builds). |
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
sudo find . -type f -name "*.pyc" -delete |
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
title restart-all | |
call taskkill /F /t /IM cmd.exe /fi "Windowtitle ne restart-all" | |
call taskkill /F /IM cmd.exe /fi "Windowtitle ne restart-all" | |
call taskkill /F /IM iexplore.exe | |
call taskkill /F /IM IEDriverServer.exe | |
start cmd.exe /k hub.bat | |
start cmd.exe /k node.bat | |
start cmd.exe /k phantomjs.bat |
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
$(git rev-parse --show-toplevel) |
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
curl -s server.com/file | sh |
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
python -m SimpleHTTPServer 8000 |
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 | |
# Use \( and \) to create a match group in the find part, use \1 in the replace part to reference the match group. | |
echo "./ThingToMatch/other/stuff/" | sed -n 's/\.\/\([a-zA-Z0-9]*\)\/.*/\1/p' | |
# This will output: ThingToMatch | |
# Works with multiline input, applying the replacement to each line. |
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 | |
# In this example checking for directories containing Python files | |
find -iname '*.py' -printf '%h/\n' |
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 | |
# Colours | |
ESC_SEQ="\x1b[" | |
COL_RESET=$ESC_SEQ"39;49;00m" | |
COL_RED=$ESC_SEQ"31;01m" | |
COL_GREEN=$ESC_SEQ"32;01m" | |
COL_YELLOW=$ESC_SEQ"33;01m" | |
COL_BLUE=$ESC_SEQ"34;01m" | |
COL_MAGENTA=$ESC_SEQ"35;01m" |
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
# pylint: disable=R0904 |