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
function Expand-ZIPFile($file, $destination) { | |
$shell = new-object -com shell.application | |
$zip = $shell.NameSpace($file) | |
foreach($item in $zip.items()) | |
{ | |
$shell.Namespace($destination).copyhere($item) | |
} | |
} | |
Expand-ZIPFile –File testfile.zip –Destination c:\temp |
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
If (!(Test-Path $CLIENT_ROOT\archive)) { | |
write-host "Creating archive folder $CLIENT_ROOT\archive" | |
New-Item -Path $CLIENT_ROOT\archive -ItemType Directory | |
} |
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/sh | |
EXPECTED_NO_LINES=1 | |
i=0 | |
echo "exp lines: ${EXPECTED_NO_LINES}" | |
echo "lines: ${ACTUAL_NO_LINES}" | |
while [ $i -eq 0 ]; do | |
ACTUAL_NO_LINES=$(cat asdf3.log | wc -l) | |
if ! [[ $ACTUAL_NO_LINES -eq $EXPECTED_NO_LINES ]]; then | |
sed -n "${EXPECTED_NO_LINES},${ACTUAL_NO_LINES}p" asdf3.log | |
EXPECTED_NO_LINES=$ACTUAL_NO_LINES |
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
Username myusername | |
Domain mydomain | |
Proxy my_proxy_server.com:80 | |
NoProxy 127.0.0.*, 192.168.* | |
Listen 127.0.0.1:5865 | |
Gateway yes | |
SOCKS5Proxy 5866 |
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
PROXYSRV=proxy.example.com:8080 | |
NOPROXY="localhost,127.0.0.1,.example.com" | |
proxy () { | |
case $1 in | |
'on') | |
echo -n "Enter passwd: " | |
read -s PASSWD | |
PROXY="http://${USER}:${PASSWD}@${PROXYSRV}" | |
export http_proxy="${PROXY}" https_proxy="${PROXY}" no_proxy="${NOPROXY}" |
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
[Unit] | |
Description=TeamCity Build Agent | |
After=network.target | |
[Service] | |
Type=forking | |
PIDFile=$AGENT_HOME/logs/buildAgent.pid | |
ExecStart=/usr/bin/sudo -u teamcity $AGENT_HOME/bin/agent.sh start | |
ExecStop=/usr/bin/sudo -u teamcity $AGENT_HOME/bin/agent.sh stop |
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
REM AUTHOR JAMES FOX | |
REM SOURCE http://technet.microsoft.com/en-us/library/ff630161(WS.10).aspx | |
REM ' | |
REM COMMENTS ON BAT SCRIPT CHANGES: FIXES ADDED TO FIX AN ISSUE WHERE CLEANMGR.EXE DOES NOT EXIST | |
REM ON WINDOWS SERVER 2008 FIXING ALL EDITIONS LISTED BELOW | |
REM SUMMARY: TEST FOR EXISTENCE OF SOURCE IF EXE DOES NOT EXIST COPY FROM SOURCE (LOCAL ON SERVER) | |
REM THIS CAN BE RUN ON ALL SERVER EDITIONS INCLUDING SERVER 2000, 2003, & 2008 32bit, 64bit, and R2 for all | |
REM ' | |
REM DECLARATIONS | |
SET SOURCEEXE="" |
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
alias cd..='cd ..' | |
alias ..='cd ..' | |
alias grep='grep --color=auto' | |
alias egrep='egrep --color=auto' | |
alias fgrep='fgrep --color=auto' | |
alias mount='mount |column -t' | |
alias path='echo -e ${PATH//:/\\n}' | |
alias now='date +"%T"' | |
alias nowtime=now | |
alias nowdate='date +"%d-%m-%Y"' |
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/sh | |
echo 'alias rdp=xfreerdp /kbd:0x0000041D -sec-ext +sec-nla /u:[domain\\username] +smart-sizing /h:1648 /w:2729 /scale:180 /scale-desktop:200' >> ~/.bashrc |
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
# make the first window number start at 1 | |
set -g base-index 1 | |
# start with pane 1 | |
set -g pane-base-index 1 | |
# screen mode | |
#set -g default-terminal "screen" | |
#set -g default-terminal "linux" | |
set -g default-terminal "putty-256color" |
OlderNewer