This guide on how to convert an SVN repository to a git repository was mostly taken from John Albin Wilkins post on Converting a Subversion repository to Git.
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
# -*- coding: utf-8 -*- | |
# Author: Douglas Creager <dcreager@dcreager.net> | |
# This file is placed into the public domain. | |
# Calculates the current version number. If possible, this is the | |
# output of “git describe”, modified to conform to the versioning | |
# scheme that setuptools uses. If “git describe” returns an error | |
# (most likely because we're in an unpacked copy of a release tarball, | |
# rather than in a git working copy), then we fall back on reading the | |
# contents of the RELEASE-VERSION file. |
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 class AwaitExtensions | |
{ | |
/// <summary> | |
/// Provides await functionality for ordinary <see cref="WaitHandle"/>s. | |
/// </summary> | |
/// <param name="handle">The handle to wait on.</param> | |
/// <returns>The awaiter.</returns> | |
public static TaskAwaiter GetAwaiter(this WaitHandle handle) | |
{ | |
Contract.Requires<ArgumentNullException>(handle != 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
import groovy.json.JsonSlurper | |
/* | |
def urlRoot = "https://example.com" | |
def issueId = "" | |
def userName = "" | |
def password = "" | |
def addr = "${urlRoot}/rest/api/2/issue/${issueId}" | |
def authString = "${userName}:${password}".getBytes().encodeBase64().toString() | |
*/ |
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
/** | |
* User: jorge.monteiro | |
* Date: 02/08/12 | |
* Time: 09:52 | |
*/ | |
@Grapes([ | |
@Grab(group = 'org.tmatesoft.svnkit', module = 'svnkit', version = '1.7.5'), | |
@Grab(group='log4j', module='log4j', version='1.2.17') | |
]) |
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
private static void CopyFile(string source, string destination, int bytesPerChunk) | |
{ | |
int bytesRead = 0; | |
using (FileStream fs = new FileStream(source, FileMode.Open, FileAccess.Read)) | |
{ | |
using (BinaryReader br = new BinaryReader(fs)) | |
{ | |
using (FileStream fsDest = new FileStream(destination, FileMode.Create)) | |
{ |
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
# A simple PowerShell script for retrieving the RAID status of volumes with help of diskpart. | |
# The nicer solution would be using WMI (which does not contain the RAID status in the Status field of Win32_DiskDrive, Win32_LogicalDisk or Win32_Volume for unknown reason) | |
# or using the new PowerShell API introduced with Windows 8 (wrong target system as our customer uses a Windows 7 architecture). | |
# | |
# diskpart requires administrative privileges so this script must be executed under an administrative account if it is executed standalone. | |
# check_mk has this privileges and therefore this script must only be copied to your check_mk/plugins directory and you are done. | |
# | |
# Christopher Klein <ckl[at]neos-it[dot]de> | |
# This script is distributed under the GPL v2 license. |
#GDG Android in Berlin brainstorming session
On November 27, 2013 I was asking the brilliant Android developers at GDG Android in Berlin for their favorite libraries that make their lives easier and should be included in every newly developed app.
This is the list of libraries we collected during this 10 minute session.
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 -m old_branch new_branch # Rename branch locally | |
git push origin :old_branch # Delete the old branch | |
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote |
OlderNewer