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
HISTTIMEFORMAT="%Y/%m/%d %H:%M:%S " | |
HISTCONTROL="ignoredups:ignorespace" | |
HISTIGNORE="ls *:history" | |
HISTSIZE=1000 |
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 | |
FILENAME=$1 | |
for FILENAME in "$@"; do | |
if ! [ -e "$FILENAME" ]; then | |
echo "File not found ($FILENAME). Skipping..." | |
elif [ -d "$FILENAME" ]; then | |
ORIG_IFS=$IFS | |
IFS=$(echo -en "\n\b") | |
for F in $(find "$FILENAME" -type f); do | |
ls -lah $F |
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
$SRC = "c:\temp" | |
$FILES = "*.mp4", "*.jpg" | |
$DST = "c:\destfolder" | |
for ($i=0; $i -lt $FILES.length; $i++) { | |
Get-ChildItem -Recurse -Path "$SRC\$FILES[$i]" | Move-Item -Destination $DST -WhatIf | |
# Write-Host("File: ") $FILES[$i] | |
} |
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
$sleep = 2 #Sleeptime in seconds between checks | |
$maxtry = 10 #Nr of tr | |
$successfile = "c:\temp\success.txt" | |
$failedfile = "c:\temp\fail.txt" | |
Write-Host "Waiting for deploy to complete" | |
for ($i=1; $i -le $maxtry; $i++) { | |
if (Test-Path "${successfile}") { | |
Write-Host "${successfile} found - Deploy was SUCCESSFUL!!" | |
Break | |
} |
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" |
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
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
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
[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
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}" |
NewerOlder