Skip to content

Instantly share code, notes, and snippets.

View WilbertOnGithub's full-sized avatar

Wilbert van Dolleweerd WilbertOnGithub

  • ICT Group
  • The Netherlands
  • 03:20 (UTC +02:00)
View GitHub Profile
@WilbertOnGithub
WilbertOnGithub / postgitsvn.ps1
Created March 20, 2012 15:33
Cleans up git repositories that have been imported with 'git svn clone'
# Script that cleans up an entire directory with Git repositories
# that have been imported from Subversion using the 'git svn clone'
# command.
# It does the following:
# - Recurses through all subdirectory in the directory you specify.
# For each git repository in a subdirectory:
# - Parses all tags from the remote branches and creates explicit
# git tags.
# - Parses all other remote branches and creates local branches
@WilbertOnGithub
WilbertOnGithub / gitconfig.cmd
Created April 17, 2012 08:43
Configure Git with P4Merge (Windows settings)
git config --global merge.tool p4merge
git config --global mergetool.p4merge.cmd "p4merge.exe \"$BASE\" \"$LOCAL\" \"$REMOTE\" \"$MERGED\""
git config --global diff.tool p4merge
git config --global difftool.p4merge.cmd "p4merge.exe \"$LOCAL\" \"$REMOTE\""
git config --global mergetool.keepBackup false
git config --global mergetool.trustExitcode false
git config --global difftool.prompt false
@WilbertOnGithub
WilbertOnGithub / gist:4030136
Created November 7, 2012 08:11
git tf log file
2012-11-07 09:08:37,338 INFO [main] (com.microsoft.tfs.jni.loader.NativeLoader) Loaded C:\Program Files (x86)\git-tf-2.0.0.20121030\native\win32\x86\native_auth.dll from user-specified directory
2012-11-07 09:08:37,461 INFO [main] (com.microsoft.tfs.core.config.httpclient.DefaultHTTPClientFactory) HttpClient configured for https://tfs.codeplex.com:443/tfs/TFS08, authenticating as logged in user, proxy=proxy.dev.ict.nl:80
2012-11-07 09:08:37,712 WARN [main] (com.microsoft.tfs.core.TFSTeamProjectCollection) Error getting data provider
com.microsoft.tfs.core.exceptions.TECoreException: The SOAP endpoint https://tfs.codeplex.com/tfs/TFS08/Services/v1.0/Registration.asmx could not be contacted. HTTP status: 405
at com.microsoft.tfs.core.exceptions.mappers.TECoreExceptionMapper.map(TECoreExceptionMapper.java:99)
at com.microsoft.tfs.core.exceptions.mappers.RegistrationExceptionMapper.map(RegistrationExceptionMapper.java:23)
at com.microsoft.tfs.core.clients.registration.RegistrationData.newFromServer(Registr
@WilbertOnGithub
WilbertOnGithub / gist:4130545
Created November 22, 2012 10:52
Part of a series of instructions on how to use Git in combination with Dropbox
D:\My Dropbox\Git repos>git clone d:\data\projects\foo --bare
@WilbertOnGithub
WilbertOnGithub / gist:4130562
Created November 22, 2012 10:57
Part of a series of instructions on how to use Git in combination with Dropbox
D:\My Dropbox\Git repos>cd \data\projects\foo
D:\Data\Projects\foo>git remote add dropbox "D:\My Dropbox\Git repos\foo.git"
@WilbertOnGithub
WilbertOnGithub / gist:4130569
Created November 22, 2012 11:00
Part of a series of instructions on how to use Git in combination with Dropbox
D:\Data\Projects\foo>git checkout master
D:\Data\Projects\foo>git push dropbox master
@WilbertOnGithub
WilbertOnGithub / .gitconfig
Created December 7, 2012 07:38
gitconfig file that shows how to configure P4Merge
[merge]
tool = p4merge
log = true
[user]
name =
email =
[core]
editor = vim
autocrlf = true
safecrlf = false
@WilbertOnGithub
WilbertOnGithub / QueueBackgroundWorkItem example
Created May 13, 2015 09:16
QueueBackgroundWorkItem example
public class ValuesController1 : ApiController
{
// POST api/<controller>
public void Post([FromBody]string value)
{
HostingEnvironment.QueueBackgroundWorkItem(ct => StartBackgroundTask());
}
private async Task StartBackgroundTask()
{
@WilbertOnGithub
WilbertOnGithub / Highchart export csv
Created May 13, 2015 09:47
Highchart export csv page
<?php
/**
* DISCLAIMER: Don't use www.highcharts.com/studies/csv-export/csv.php in
* production! This file may be removed at any time.
*/
$csv = $_POST['csv'];
if ($csv) {
header('Content-type: text/csv');
header('Content-disposition: attachment;filename=chart.csv');
echo $csv;
@WilbertOnGithub
WilbertOnGithub / Highcharts csv-export
Created May 13, 2015 09:58
Highcharts csv-export
Highcharts.getOptions().exporting.buttons.exportButton.menuItems.push({
text: 'Download CSV',
onclick: function () {
Highcharts.post('http://www.highcharts.com/studies/csv-export/csv.php', {
csv: this.getCSV()
});
}
});