$ git commit --amend --author="Author Name <email@address.com>"or
$ git commit --amend --reset-author| ruby_block "create ssh key" do | |
| block do | |
| k = SSHKey.generate(:type => 'RSA', :bits => 1024, :comment => "Postgres Master") | |
| node.set[:postgresql][:pubkey] = k.ssh_public_key | |
| node.save | |
| # Much of the DSL disappears in ruby blocks. Here's how to create a template. | |
| rc = Chef::RunContext.new(node, node.cookbook_collection) | |
| t = Chef::Resource::Template.new "/var/lib/postgresql/.ssh/id_rsa" | |
| t.source("id_rsa.erb") |
| using System; | |
| using System.Collections.Concurrent; | |
| using System.Threading; | |
| using System.Threading.Tasks; | |
| using System.Threading.Tasks.Dataflow; | |
| namespace TDFDemo | |
| { | |
| class Program | |
| { |
| // intended to be called only ONCE in real installations - or for a clean test run when no Jobs container exists | |
| public static void GloballyInitializeJobManager(bool quiet) | |
| { | |
| var blobContainer = AzureStorageAccess.GetBlobContainer(JobContainerName); | |
| bool didNotExistCreated = blobContainer.CreateIfNotExist(); | |
| if (!quiet) System.Diagnostics.Debug.Assert(didNotExistCreated); // else, we probably should not be calling this method | |
| var blob = blobContainer.GetBlobReference(JobGlobalJobIdSequencePath); | |
| if (!blob.Exists()) | |
| { | |
| blob.UploadText(JobGlobalJobIdSequenceStartingValue); |
| <Activity x:Class="TfsBuild.Process" xmlns="http://schemas.microsoft.com/netfx/2009/xaml/activities" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mt="clr-namespace:Microsoft.TeamFoundation;assembly=Microsoft.TeamFoundation.Common" xmlns:mtbc="clr-namespace:Microsoft.TeamFoundation.Build.Client;assembly=Microsoft.TeamFoundation.Build.Client" xmlns:mtbco="clr-namespace:Microsoft.TeamFoundation.Build.Common;assembly=Microsoft.TeamFoundation.Build.Common" xmlns:mtbw="clr-namespace:Microsoft.TeamFoundation.Build.Workflow;assembly=Microsoft.TeamFoundation.Build.Workflow" xmlns:mtbwa="clr-namespace:Microsoft.TeamFoundation.Build.Workflow.Activities;assembly=Microsoft.TeamFoundation.Build.Workflow" xmlns:mtba="clr-namespace:Microsoft.TeamFoundation.Build.Activities;assembly=Microsoft.TeamFoundation.Build.Activities" xmlns:mtbac="clr-namespace:Microsoft.TeamFoundation.Build.Activities.Core;assembly=Microsoft.TeamFoundation.Build.Activities" xmlns:mtbag="clr-namespace:Microsoft.TeamFound |
| Task flushingTask = null; | |
| public override Task FlushAsync(CancellationToken cancellationToken) | |
| { | |
| Interlocked.CompareExchange( | |
| ref flushingTask, | |
| Task.Delay(200, cancellationToken).ContinueWith( | |
| async (t) => | |
| { | |
| await write.FlushAsync(cancellationToken); |
| @echo off | |
| :: http://stackoverflow.com/questions/328017/path-to-msbuild | |
| :: http://www.csharp411.com/where-to-find-msbuild-exe/ | |
| :: http://timrayburn.net/blog/visual-studio-2013-and-msbuild/ | |
| :: http://blogs.msdn.com/b/visualstudio/archive/2013/07/24/msbuild-is-now-part-of-visual-studio.aspx | |
| setlocal | |
| :vswhereModernTry | |
| :: https://github.com/Microsoft/vswhere/wiki/Find-MSBuild | |
| :: Normal output example of `vswhere -legacy -latest -property installationPath` has no trailing back-slash: |
Find and create a partition with free space:
# parted
GNU Parted 2.3
Using /dev/sda
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print free
Model: ATA Crucial_CT240M50 (scsi)
Disk /dev/sda: 240GB
Sector size (logical/physical): 512B/4096B
#Kibana gh The lucene query type uses LUCENE query string syntax to find matching documents or events within Elasticsearch.
Examples
status field contains active
status:active
title field contains quick or brown
title:(quick brown)
| Import-Module "sqlps" | |
| $smo = 'Microsoft.SqlServer.Management.Smo.' | |
| $wmi = new-object ($smo + 'Wmi.ManagedComputer'). | |
| # List the object properties, including the instance names. | |
| $Wmi | |
| # Enable the TCP protocol on the default instance. | |
| $uri = "ManagedComputer[@Name='" + (get-item env:\computername).Value + "']/ServerInstance[@Name='MSSQLSERVER']/ServerProtocol[@Name='Tcp']" | |
| $Tcp = $wmi.GetSmoObject($uri) |