A Git alias to quickly check out a Pull Request branch in a single move. ⚡
git config --global alias.cpr '!f() { git fetch --quiet ${GIT_DEFAULT_REMOTE-origin} pull/$1/head:pulls/$1 && git checkout pulls/$1; }; f'
//----------------------------------------------------------------------- | |
// <copyright file="«?FileBase»«?FileExtension»" company="«BlockAnchor»«Link(CompanyName)»«Caret»"> | |
// Copyright (c) «Link(CompanyName)». All rights reserved. | |
// </copyright> | |
//----------------------------------------------------------------------- |
[Test] | |
public void CS_compiler_should_allow_named_arguments_in_lambdas() | |
{ | |
// Given | |
var mock = new Mock<IProceduralPizzaStore>(); | |
// When | |
mock.Verify( | |
m => m.OrderPizza( | |
name: "Quattro Formaggi", |
function Import-PSSnapin { | |
<# | |
.Synopsis | |
Adds a Windows PowerShell snap-in with the specified name to the current session. | |
This cmdlet will not throw an exception if the specified snap-in is already present in the session. | |
.Description | |
Helper function to safely add a Windows PowerShell snap-in with the specified name to the current session. | |
.Parameter Name | |
The name of the snap-in to import. | |
#> |
#!/bin/bash | |
# htmltomd | |
# Downloads the HTML source from a list of URLs and converts it to Markdown. | |
# The source file must contain each URL to download from on a separate line. | |
# The actual conversion is done by the awesome API available at | |
# http://heckyesmarkdown.com | |
urlsFile=$1 | |
outputDir=${2:-.} # Defaults to local dir |
#!/bin/sh | |
# | |
# A hook script that checks the length of the commit message. | |
# | |
# Called by "git commit" with one argument, the name of the file | |
# that has the commit message. The hook should exit with non-zero | |
# status after issuing an appropriate message if it wants to stop the | |
# commit. The hook is allowed to edit the commit message file. | |
DEFAULT="\033[0m" |
A Git alias to quickly check out a Pull Request branch in a single move. ⚡
git config --global alias.cpr '!f() { git fetch --quiet ${GIT_DEFAULT_REMOTE-origin} pull/$1/head:pulls/$1 && git checkout pulls/$1; }; f'
<?xml version="1.0" encoding="utf-8"?> | |
<CodeSnippet Format="1.0.0" xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet"> | |
<Header> | |
<Title>File Header</Title> | |
<Author>Enrico Campidoglio</Author> | |
<Shortcut>fh</Shortcut> | |
<Description>Adds a StyleCop compliant file header comment with company and copyright information.</Description> | |
<SnippetTypes> | |
<SnippetType>Expansion</SnippetType> | |
</SnippetTypes> |
I hereby claim:
To claim this, I am signing this object:
#!/bin/bash | |
# cpustatus | |
# | |
# Prints the current state of the CPU like temperature, voltage and speed. | |
# The temperature is reported in degrees Celsius (C) while | |
# the CPU speed is calculated in megahertz (MHz). | |
function convert_to_MHz { | |
let value=$1/1000 | |
echo "$value" |
function Out-Diff { | |
<# | |
.Synopsis | |
Redirects a Universal DIFF encoded text from the pipeline to the host using colors to highlight the differences. | |
.Description | |
Helper function to highlight the differences in a Universal DIFF text using color coding. | |
.Parameter InputObject | |
The text to display as Universal DIFF. | |
#> | |
[CmdletBinding()] |