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
/* | |
The MIT License (MIT) | |
Copyright (c) 2014 Andrew Fray, Marcelo Oliveira | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is |
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
///////////////////////////////////////////////////////////////////////////// | |
// C# Version Copyright (c) 2003 CenterSpace Software, LLC // | |
// & Spry Fox LLC (c) 2013 // | |
// // | |
// This code is free software under the Artistic license. // | |
// // | |
// CenterSpace Software // | |
// 2098 NW Myrtlewood Way // | |
// Corvallis, Oregon, 97330 // | |
// USA // |
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 branch -r --merged develop | %{$_.trim()} | select @{n='Branch';e={$_}},@{n='LastCommit';e={[datetime](git log $_ -1 --pretty=format:%ci)}} | sort LastCommit |
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 branch -r --merged develop | %{$_ + " : " + (git log $_.Trim() -1 --pretty=format:%ct)} | sort {$_.Split(':')[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
for branch in `git branch -r --merged develop`; do | |
echo $branch `git log $branch -1 --pretty=format:%ct` | |
done | sort -k2 |
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
public static float MapValue(float inVal, float inFrom, float inTo, float outFrom, float outTo) | |
{ | |
float inScale = (inFrom != inTo) | |
? ( ( inVal - inFrom ) / ( inTo - inFrom ) ) | |
: 0.0f; | |
float outVal = outFrom + ( inScale * ( outTo - outFrom ) ); | |
outVal = (outFrom < outTo ) | |
? SomeClampFunction( outVal, outFrom, outTo ) | |
: SomeClampFunction( outVal, outTo, outFrom ); | |
return outVal; |
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
;; eg when in a text file, (execute-shell-command-on-buffer "p4 edit %s") will check out the file in perforce | |
(defun execute-shell-command-on-buffer (shell-command-text) | |
(interactive "MShell command:") | |
(shell-command (format shell-command-text (shell-quote-argument buffer-file-name))) | |
) |
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
#include <algorithm> | |
#include <vector> | |
#include <stdio> | |
int main() | |
{ | |
typedef std::pair<int,int> Pos; | |
typedef std::pair<Pos, unsigned char> PosChar; | |
typedef vector<PosChar> list; |
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
param([int]$changelistNum, [string]$destBranch) | |
$regex = "^\s+//[^/]+(/\S+)\s" | |
$sourceFiles = p4 change -o $changelistNum | select-string $regex | %{$_.matches[0]} | |
$sourceFiles | %{ | |
$sourcePath = (p4 where $_.groups[0].value.trim()).split(' ')[2]; | |
$destPath = (p4 where ($destBranch + $_.groups[1].value)).split(' ')[2]; | |
p4 edit $destPath; | |
copy $sourcePath $destPath; |
NewerOlder