Skip to content

Instantly share code, notes, and snippets.

View EricSch's full-sized avatar
🏠
Working from home

Eric Schoenholzer EricSch

🏠
Working from home
View GitHub Profile
@charlesartbr
charlesartbr / DataUrlHelper.cs
Last active March 5, 2024 13:08
Convert a DataUrl to Stream in C#
using System;
using System.IO;
using System.Text.RegularExpressions;
namespace charles.art.br
{
public class DataUrlHelper
{
public string ContentType { get; set; }
@pdcullen
pdcullen / UploadController.cs
Created July 28, 2014 13:36
ng-flow asp.net api2 upload class
using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.IO;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Runtime.Serialization;
using System.Threading.Tasks;
using System.Web;
@atifaziz
atifaziz / csboot.cmd
Created November 23, 2012 11:19
C# embedded in a bootstrapping batch script
@@@ setlocal
@@@ set cmdnet=%temp%\cmd.net& set base=%temp%\cmd.net\%~n0& set this=%~f0
@@@ if not exist "%cmdnet%" md "%cmdnet%"
@@@ fc "%cmdnet%\%~nx0" "%this%" >nul 2>&1 && if exist "%base%.exe" set same=1
@@@ if not defined same copy "%this%" "%cmdnet%" >nul
@@@ if not defined same findstr /v "^@@@" "%this%" > "%base%.cs" || exit /b 42
@@@ if not defined same for /f %%i in ('dir /b /ad /on "%windir%\Microsoft.NET\Framework\v*"') do @if exist "%windir%\Microsoft.NET\Framework\%%i\csc".exe set csc=%windir%\Microsoft.NET\Framework\%%i\csc.exe
@@@ if not defined same if not defined csc (echo C# compiler not found>&2 & exit /b 42)
@@@ if defined csc "%csc%" /nologo /d:TRACE "/out:%base%.exe" "%base%.cs" || (type "%base%.cs" & del "%base%.cmd" & exit /b 42)
@@@ "%base%.exe" %*
@mxriverlynn
mxriverlynn / 1-layout.html
Created June 21, 2011 03:06
render backbone views with jquery templates
<html>
<head>
<script src="jquery-1.6.1.min.js"></script>
<script src="http://ajax.microsoft.com/ajax/jquery.templates/beta1/jquery.tmpl.min.js"></script>
<script src="underscore-min.js"></script>
<script src="backbone-min.js"></script>
<script src="example.js"></script>
<style type="text/css">
fieldset {
@atifaziz
atifaziz / wgets.wsf
Created May 11, 2011 21:15
Simple WGET clone in WSH
<job>
<runtime>
<description>A non-interactive web retriever script.
Copyright (c) Atif Aziz. All rights reserved.
Written by Atif Aziz, http://www.raboof.com/
Creative Commons Attribution-ShareAlike 3.0 Unported License.
http://creativecommons.org/licenses/by-sa/3.0/
</description>