Skip to content

Instantly share code, notes, and snippets.

View Manuel-S's full-sized avatar

Manuel Schweigert Manuel-S

  • Karlsruhe, Germany
View GitHub Profile
@Manuel-S
Manuel-S / find missing solution files.ps1
Last active August 29, 2015 14:09
Parses a Solution file to check all projects for missing content files. Useful as a pre-deployment-packaging step.
#requires -version 2.0
[CmdletBinding()]
param (
[parameter(Mandatory=$true)]
[ValidateScript({ Test-Path -Path $_ -PathType Leaf })]
[string]
$Path
)
$ErrorActionPreference = 'Stop'
@Manuel-S
Manuel-S / BufferWhile.cs
Created December 1, 2014 13:05
BufferWhile Rx Extension
public static IObservable<IList<TSource>> BufferWhile<TSource>(
this IObservable<TSource> source,
Func<TSource, bool> condition)
{
return source.AggregateUntil(
() => new List<TSource>(),
(list, value) =>
{
list.Add(value);
return list;
@Manuel-S
Manuel-S / sync.html
Created December 5, 2014 13:42
Syncs a textbox over different windows without a server using localStorage
<html lang="en">
<head>
<title>Syncbox</title>
</head>
<body>
<textarea id="sync" style="width:100%; height:100%; overflow:auto; border:0;"></textarea>
<script>
if(window.localStorage){
var sync = document.getElementById("sync");
var key = 'sync';
@Manuel-S
Manuel-S / dev-install.ps1
Last active August 29, 2015 14:11
My Developer Machine RC1
# to install, enter this command in WIN+R prompt:
# http://bit.ly/1zIthRQ
# Boxstarter options
$Boxstarter.RebootOk=$True # Allow reboots
$Boxstarter.NoPassword=$False
$Boxstarter.AutoLogin=$True # Save my password securely and auto-login after a reboot
# bigger console window
if ($Host.Name -match "console"){
#requires -version 2.0
[CmdletBinding()]
param (
[parameter(Mandatory=$true)]
[ValidateScript({ $_.ToLower().StartsWith("d4.") -or $_.ToLower().StartsWith("d5.") -or $_.ToLower() -eq "dev" })]
[string]
$Version
)
echo "************************BEGIN*********************************"
//tested this myself
//should probably also try
//https://github.com/knockout/knockout/wiki/Bindings---tinyMCE
tinymce.init({
setup: function (ed) {
ed.on('keyup', function (e) {
tinyMceChange(ed);
});
ed.on('change', function(e) {
@Manuel-S
Manuel-S / gitsetup.ps1
Last active August 29, 2015 14:15
trying to get git running nicely
cinst git.install
cinst git.commandline
cinst msysgit
cinst poshgit
@Manuel-S
Manuel-S / convert2mp3.bat
Last active August 29, 2015 14:17
Convert videos to mp3 using VLC
REM usage: convert2mp3.bat path\to\video.mp4
start "%ProgramFiles(x86)%\VideoLAN\vlc\vlc.exe -I dummy --sout '#std{access=file,mux=raw,dst=%~n1.mp3}' %1 vlc://quit"
@echo off
:start
cls
set ssid=
set pw=
cls
SET/P username=Please enter the network ssid:
@Manuel-S
Manuel-S / Exceptionhandling.cs
Last active October 28, 2015 14:16
C# can do unicode...
try
{
DoStuff()
}
catch (ArgumentException 💩)
{
Console.WriteLine(💩.Message);
}
catch (Exception ಠ_ಠ)
{