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
<?xml version="1.0" encoding="utf-8" ?> | |
<Patterns xmlns="urn:shemas-jetbrains-com:member-reordering-patterns"> | |
<Pattern RemoveAllRegions="true"> | |
<Entry /> | |
</Pattern> | |
<Pattern> | |
<Match> | |
<Or Weight="100"> |
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
task GetBuildNumber { | |
$version = gc $base_directory\$solution_name\Properties\AssemblyInfo.cs | select-string -pattern "AssemblyVersion" | |
$version -match '^\[assembly: AssemblyVersion\(\"(?<major>[0-9]+)\.(?<minor>[0-9]+)\.(?<revision>[0-9]+)\.(?<build>[0-9]+)\"\)\]' | Out-Null | |
"##teamcity[buildNumber '{0}.{1}.{2}.{3}']" -f $matches["major"],$matches["minor"],$matches["revision"],$matches["build"] | |
} |
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
Processing ChartsBurndownController#index (for 10.6.104.43 at 2010-07-13 04:06:13) [GET] | |
Parameters: {"project_id"=>"pbr", "action"=>"index", "controller"=>"charts_burndown"} | |
NoMethodError (undefined method `parent_id' for #<Issue:0x7f9d3efedcc8>): | |
vendor/plugins/redmine_charts/app/controllers/charts_burndown_controller.rb:79:in `get_data_for_burndown_chart' | |
vendor/plugins/redmine_charts/app/controllers/charts_burndown_controller.rb:74:in `each' | |
vendor/plugins/redmine_charts/app/controllers/charts_burndown_controller.rb:74:in `get_data_for_burndown_chart' | |
vendor/plugins/redmine_charts/app/controllers/charts_burndown_controller.rb:8:in `get_data' | |
vendor/plugins/redmine_charts/app/controllers/charts_controller.rb:107:in `create_chart' | |
vendor/plugins/redmine_charts/app/controllers/charts_controller.rb:79:in `index' |
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
Doesn't work: | |
$data = "`"{'message':{'body':'{0} - {1}'}}`"" -f $message, $url | |
Throws: | |
Error formatting a string: Input string was not in a correct format.. | |
At Script.ps1:11 char:50 | |
+ $data = "`"{'message':{'body':'{0} - {1}'}}`"" -f <<<< $message, $url | |
+ CategoryInfo : InvalidOperation: (System.Object[]:Object[]) [], RuntimeException | |
+ FullyQualifiedErrorId : FormatError |
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
# when in a git directory, outputs: | |
# GIT [branch] +# ~# -# | C:\my\path | |
# when in any other directory, outputs: | |
# PS C:\my\other\path | |
function prompt { | |
Write-Host("") | |
$status_string = "" | |
# check to see if this is a directory containing a symbolic reference, | |
# fails (gracefully) on non-git repos. |
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
#full details now available: http://tiredblogger.wordpress.com/2011/12/28/finding-todos-and-reporting-in-powershell/ | |
param( | |
#this is appalling; there has to be a better way to get the raw name of "this" directory. | |
[string]$DirectoryMask = (get-location), | |
[array]$Include = | |
@("*.spark","*.cs","*.js","*.coffee","*.rb"), | |
[array]$Exclude = | |
@("fubu-content","packages","build","release"), | |
[switch]$Html, |
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
gnome-desktop-item-edit ~/Desktop/ --create-new | |
#just so I don't forget... again. |
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
$homeNet = "10.1.4.*", "OfficePrinter" | |
$remoteNet = "10.1.6.*", "W382_HP_Printer" | |
function Set-DefaultPrinter([string]$printerPath) { | |
$printers = gwmi -class Win32_Printer -computer . | |
Write-Host -fore cyan "Default Printer: $printerPath" | |
$dp = $printers | ? { $_.deviceID -match $printerPath } | |
$dp.SetDefaultPrinter() | Out-Null | |
} |
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
[Serializable] | |
public class OracleSQLAliasToBeanTransformer : IResultTransformer | |
{ | |
const BindingFlags Flags = BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance; | |
readonly System.Type _resultClass; | |
ISetter[] _setters; | |
readonly IPropertyAccessor _propertyAccessor; | |
readonly ConstructorInfo _constructor; | |
readonly PropertyInfo[] _fields; | |
public OracleSQLAliasToBeanTransformer(Type resultClass) |
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 ( | |
[string]$RoomNumber = (Read-Host "The room to post to (default: 123456) "), | |
[string]$Message = (Read-Host "The message to send ") | |
) | |
$defaultRoom = "123456" | |
if ($RoomNumber -eq "") { | |
$RoomNumber = $defaultRoom | |
} | |
$authToken = "YOUR AUTH TOKEN" |
OlderNewer