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 | |
target=$1 | |
datetime=$2 | |
if [ -z "$target" ] ; then | |
>&2 echo 'No target is specified.' | |
>&2 echo "Usage: $0 <cron-specification> [<date-time>]" | |
>&2 echo " e.g. $0 '* 16,17 * * *'" | |
>&2 echo " e.g. $0 '* 16,17 * * *' '2014-01-01 17:32'" |
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
-- Usage: | |
-- SELECT * FROM fnRunningQueries | |
-- SELECT * FROM fnRunningQueries(2) ORDER BY totalCpu DESC | |
-- SELECT GETDATE() DateTime, * INTO QueryHistory FROM fnRunningQueries(0) | |
-- INSERT INTO QueryHistory SELECT GETDATE() DateTime, * FROM fnRunningQueries(0) | |
-- SELECT * FROM QueryHistory ORDER BY DateTime DESC | |
set ANSI_NULLS ON | |
set QUOTED_IDENTIFIER ON |
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
[cmdletbinding()] | |
Param( | |
[string]$Item, | |
[string]$TagMatch = "*" | |
) | |
$ErrorActionPreference = "Stop" | |
$Item = (Resolve-Path $Item).Path |
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
[CmdletBinding(SupportsShouldProcess)] | |
param | |
( | |
[Parameter(Mandatory = $True)] | |
[string]$SourceBranch, | |
[Parameter(Mandatory = $True)] | |
[string[]]$DestinationBranches | |
) |
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 | |
# Explanation | |
# | |
# 1/ Put the 3 scripts (2 hooks) in .git/hooks of your repository | |
# 2/ Adjust .git/config to set merge targets: | |
# e.g. | |
# | |
# [branch "fix-MyFixBranch"] | |
# remote = origin |
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 | |
# linux / cygwin | |
git rev-list --objects --all | sort -k 2 > /tmp/allfileshas.txt | |
git verify-pack -v .git/objects/pack/pack-*.idx | egrep "^\w+ blob\W+[0-9]+ [0-9]+ [0-9]+$" | sort -k 3 -n -r | head -25 > /tmp/bigobjects.txt | |
echo > /tmp/bigtosmall.txt | |
for SHA in `cut -f 1 -d\ < /tmp/bigobjects.txt`; do | |
#echo $(grep $SHA /tmp/bigobjects.txt) $(grep $SHA /tmp/allfileshas.txt) | awk '{print $1,$3,$7}' >> /tmp/bigtosmall.txt | |
echo $(grep $SHA /tmp/bigobjects.txt) $(grep $SHA /tmp/allfileshas.txt) | awk '{print $1,$3,substr($0,index($0,$7))}' >> /tmp/bigtosmall.txt |
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
# Rename/move to ~/.bashrc | |
# Source global definitions | |
if [ -f /etc/bashrc ]; then | |
. /etc/bashrc | |
fi | |
# User specific aliases and functions | |
#alias telnet="telnet -e ^[" | |
alias ll="ls -l" |
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
$match = 'CTArchitect-*' | |
git branch | %{ $_ -replace '^[* ] ([^ ]*$)', '$1' } | ?{ $_ -match '^(Version-.*)|(master)$' } | %{ git describe --match $match $_ } | |
$contains='' | |
git branch --contains $contains | %{ $_ -replace '^[* ] ([^ ]*$)', '$1' } | ?{ $_ -match '^(Version-.*)|(master)$' } | %{ git describe --match $match $_ } | |
git branch -r --contains $contains | %{ $_ -replace '^[* ] ([^ ]*)(?: -> .*)?$', '$1' } | ?{ $_ -match '^(?:.*/)?(Version-.*)|(master)$' } | %{ git describe --match $match $_ } | |
git tag --contains $contains | Group-Object { $_ -replace '^(.*-v?\d+\.\d+\.\d+)\.\d+$', '$1' } | Where-Object { $_.Name -like $match } | %{ $_.Group[$_.Group.Count - 1]} |
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
(sip && !(sip.CSeq.method == "REGISTER")) || h323 |
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
# How-to to copy take a directory 'BuildScripts' out of a big GIT repository 'ContactCentre', retainining history | |
# STEP 1: Create the BuildScripts repository | |
# Clone the big repository, which will be stripped down to the directory BuildScripts | |
git clone ContactCentre BuildScripts | |
# Safety measure: detach from server, to prevent pushing a split back to the server by mistake | |
git remote rm origin |
OlderNewer