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
#include <QList> | |
#include <QtAlgorithms> | |
#include <QDebug> | |
#include <QtConcurrentRun> | |
QList<int> sort(QList<int> unsorted, int chunkId){ | |
qDebug() << "starting to sort chunk " << chunkId; | |
qSort(unsorted); | |
qDebug() << "finished to sort chunk " << chunkId; | |
return unsorted; |
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
\documentclass[a4paper,DIV=calc,ngerman]{scrartcl} | |
\usepackage[T1]{fontenc} | |
\usepackage[latin1]{inputenc} | |
\usepackage[ngerman]{babel} | |
\begin{document} | |
\newcommand{\aufz}[1]{ | |
\makeatletter |
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
aptitude install -y git curl python-dev python-pip redis-server ruby1.9.1-full rubygems1.9.1 | |
aptitude install -y mysql-server libmysqlclient-dev | |
adduser --system --shell /bin/sh --gecos 'git version control' --group --disabled-password --home /home/git git | |
adduser --disabled-login --gecos 'gitlab system' gitlab | |
usermod -a -G git gitlab | |
su - gitlab | |
ssh-keygen -q -N '' -t rsa -f /home/gitlab/.ssh/id_rsa | |
aptitude install gitolite | |
cp /home/gitlab/.ssh/id_rsa.pub /home/git/gitlab.pub | |
su - 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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using NLog; | |
using NLog.Common; | |
using NLog.Targets; | |
using NLog.Config; | |
namespace ConsoleApplication1 |
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
using Microsoft.Win32; | |
using System; | |
using System.Diagnostics; | |
// originally from https://github.com/shanselman/SmallestDotNet/tree/master/CheckForDotNet45 | |
// patched to work even on windows server core | |
namespace CheckForDotNet45 | |
{ | |
internal class Program | |
{ |
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 MyExtensions | |
//{ | |
// // Write custom extension methods here. They will be available to all queries. | |
// public static IEnumerable<String> ReadLines(this FileInfo file) | |
// { | |
// if (null == file) throw new ArgumentNullException(nameof(file)); | |
// return File.ReadLines(file.FullName, Encoding.UTF8); | |
// } | |
//} |
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
type integerString = {i:int; s:string} | |
let FizzThrough //: integerString -> integerString = | |
input = | |
if(input.i%3=0) | |
then {i=input.i;s="Fizz"} | |
else {i=input.i;s=input.s} | |
let BuzzThrough input = | |
if(input.i%5=0) |
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
Enumerable.Range(1, 100) | |
.Select(i => new { i, s = ""}) | |
.Select(si => si.i%3==0? new { si.i, s = "Fizz"} : si) | |
.Select(si => si.i%5==0? new { si.i, s = si.s+"Buzz"} : si) | |
.Select(si => si.s.Length>0?new { si.i, s = si.s+Environment.NewLine} : si) | |
.Select(si=>si.s).Aggregate((a,b)=>a+b) |
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
C:\Program Files (x86)\Microsoft SDKs\F#\4.0\Framework\v4.0\fsc.exe | |
-o:obj\Debug\FSInfoVersion.exe | |
-g | |
--debug:full | |
--noframework | |
--define:DEBUG | |
--define:TRACE | |
--doc:bin\Debug\FSInfoVersion.XML | |
--optimize- | |
--tailcalls- |
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
using System.Management; | |
// reference System.Management.dll | |
void Main() | |
{ | |
using (var control = new USBControl()) | |
{ | |
Console.ReadLine();//block - depends on usage in a Windows (NT) Service, WinForms/Console/Xaml-App, library | |
} | |
} |
OlderNewer