Skip to content

Instantly share code, notes, and snippets.

View Floating City.Townscaper
MSCnWsJcDLqH_SUNGLqGlFRPcloRLRwYiGwENOLqeMaRd6viqHoS0YmoHXW06soHGW0esoRaR1FcJge4KtgpL3VENOL6ynE9oZimhF9oWCaLW0KtI6BfFtJL6Dp0clgGuE0EmeAYRjwie8WR1jTJoyLB9xSiGwENDLaMW0osoVaR1j6K6FkEtNpRKBNXphLBtgpyMRLtiavV0zro9XRwxi2iFNKLabW0MtouBJRwYi2bFNALaOW0_so6BoE0qlgWhF9xhKgmFVANPqAanVU9xeKgWBVANTqAa1UB0uroHaSjUCauSQDXaMTjfKgmLVANJL6R1Urr6i30eroHnSQbiaFW0jHJa3V06roZZR0jeJaxTB0opCoNV1DGqdRNwKi2iF9gc6ym0cleQKB0EomH16q2m1DnpWS1jhpZPNUqBXRPqmGeFNALaFW0cso6BkENaJanTB0qpCoHTV1MroagW1jGqHbTwn6hzUP8qmhF1iseAJRwSiGqENXJa4SLgaVUP8koaIVrtiqVXR06roalWPGmq5MNvpAaqTTla2UB0MrouYPNOqNVR7ziekQFUPclm008pmq1ncJaFTDcatU7rapVjvaGWPgkGp0smCoBQFUNGqgqZTFQDpazVjwaOXA9YdagU71qG1FQr7CoVeB0YvA6Cm0zmGM1oqq1YVPsnCqaSUBVPSmmP1Cte4KVr2qegcB0jdp5MFQwmKgG7FQP_mmA1IpWS1ksecI1GlaVTbdKoqZRFUrlabVt2Ka-VNTr6yUVbsqmdVNDrmuVdyRqlJ1InCqlQtNqg6Bx0snmP1xsexa1DJp2vVRj6ieYMFQrmKgG7FQPclmwF9ofaDUbpaGWPcmm60aomK16sqRcNrL6hf0Cl210AnCqGI1qqmX1irme1it6yh0ukW90soCqdWNkL6yt08p2j1DHpdbV0D3pNQtRrmw1DfpAa0UB0YvA6y_U76ieYcRPmn6Bv1D2pBbV0D8oFINFpNJNOpVKNXpdLFQjYaQTTbKoakTDhaSU
View userChrome.css
#navigator-toolbox{
background:transparent;
}
#navigator-toolbox > *{
background:#999;
}
#navigator-toolbox {
position: relative;
@hansschmucker
hansschmucker / swrplayer.user.js
Created Dec 11, 2014
Replace SWR error message at http://mp3-live.swr.de/ with player links.
View swrplayer.user.js
// ==UserScript==
// @name SWR Radio M3U
// @namespace de.schmucker-partner.swr.m3u
// @include http://mp3-live.swr.de/
// @version 1
// @grant none
// ==/UserScript==
var urls = [
'http://mp3-live.swr.de/swr1bw_m.m3u',
'http://mp3-live.swr.de/swr1rp_m.m3u',
View resolution.cmd
@ECHO OFF
SETLOCAL
SET RES_X=%1
SET RES_Y=%2
echo @^
using System.Runtime.InteropServices;^
[StructLayout(LayoutKind.Sequential)]^
public struct DispSet {^
[MarshalAs(UnmanagedType.ByValArray,SizeConst=106)]^
byte[] padding0;^
@hansschmucker
hansschmucker / c#.ps1
Created Sep 4, 2014
Source for a minimal C# compiler for use in batch files see https://gist.github.com/hansschmucker/820d3bdeca34c665b77a
View c#.ps1
$opt = New-Object System.CodeDom.Compiler.CompilerParameters;
$opt.GenerateInMemory = $true;
$cr = [System.CodeDom.Compiler.CodeDomProvider]::CreateProvider("CSharp").CompileAssemblyFromSource($opt, "public class App { public static void Main() { "+ $input+" } }");
if($cr.CompiledAssembly){
$obj = $cr.CompiledAssembly.CreateInstance("App");
$obj.GetType().GetMethod("Main").Invoke($obj, $null);
}else{
$cr.errors;
}
@hansschmucker
hansschmucker / c#.cmd
Last active Aug 29, 2015
Compiles C# code piped to it and runs it immediately without a temporary EXE. Prefix "@" if you want to describe a whole class, not just the content of main.
View c#.cmd
@PowerShell -command "$src=''+$input; if ( $src -match '^[\s]*@([\s\S]*)$' ){ $src=$matches[1]; }else{ $src='using System; public class App { public static void Main() { '+$src+' } } '; } $opt = New-Object System.CodeDom.Compiler.CompilerParameters; $opt.GenerateInMemory = $true; $cr = [System.CodeDom.Compiler.CodeDomProvider]::CreateProvider('CSharp').CompileAssemblyFromSource($opt, $src); if($cr.CompiledAssembly) {$obj = $cr.CompiledAssembly.CreateInstance('App'); $obj.GetType().GetMethod('Main').Invoke($obj, $null);}else{ $cr.errors; }"