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 class Runner | |
{ | |
public async Task<RunResults> Run(ProcessStartInfo info) | |
{ | |
var process = new Process(); | |
var runResults = new RunResults(); | |
//some defaults that HAVE to be in place | |
info.RedirectStandardOutput = true; | |
info.RedirectStandardError = true; |
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 System.Net.Sockets; | |
using System.Data; | |
using System.Net; | |
using System.Threading; | |
using System.Threading.Tasks; | |
using System.Reactive.Linq; |
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
function PeopleRepository() { | |
//when using constructor functions like this one to create objects in js, | |
//always make sure you're doing so with the new keyword | |
//or the scope will be off | |
// | |
//like so: | |
if(!(this instanceof PeopleRepository) { | |
return new PeopleRepository(); | |
//we just enforced new | |
} |
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
/** | |
* allows you to wrap or insert an html tag over a selection/range using rangy | |
* @param iframe the CKEditor iframe html element | |
* @param tagName string representation of the tag, such as 'a' for anchor | |
* @param withNodeFunc function to allow outside modification of the element before injecting/wrapping | |
*/ | |
function wrapOrInsert(iframe, tagName, withNodeFunc) { | |
var iframedoc = iframe.contentDocument || iframe.contentWindow.document, | |
tag = iframedoc.createElement(tagName), | |
selection = rangy.getIframeSelection(iframe), |
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 System.Net.Sockets; | |
using System.Data; | |
using System.Net; | |
using System.Threading; | |
using System.Threading.Tasks; | |
using System.Reactive.Linq; |
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
#!/bin/bash | |
# html5 videos maker | |
ffmpeg -i $1 -b 1500k -vcodec libx264 -g 30 -s 640x360 $1.mp4 | |
ffmpeg -i $1 -b 1500k -vcodec libvpx -acodec libvorbis -ab 55000 -f webm -g 30 -s 640x360 $1.webm | |
ffmpeg -i $1 -b 1500k -vcodec libtheora -acodec libvorbis -ab 55000 -g 30 -s 640x360 $1.ogv |
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
{ | |
"name":"image", | |
"settings":{ | |
"uri":"http://localhost:8888/out.jpg" | |
"index":0 | |
}, | |
"commands":[ | |
{ "name":"resize", "args":{"width":100,"height":300} }, | |
{ "name":"combine", "args":{"map":""} } | |
] |
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
@{ | |
object copy = new | |
{ | |
year = Model.Element("CopyrightDate").Content.Value, | |
school = Model.Element("SchoolName").Content.Value, | |
address = Model.Element("SchoolAddress").Content.Value, | |
city = Model.Element("SchoolCity").Content.Value, | |
state = Model.Element("SchoolState").Content.Value, | |
phone1 = Model.Element("SchoolPhonePrimary").Content.Value, | |
phone2 = Model.Element("SchoolPhoneSecondary").Content.Value |
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
/* WagStack | |
* | |
* TPL Async DAL using ServiceStack's Expression/SQL Building | |
* and Insight.Database's async features | |
*/ | |
public class WagStackAsyncRepository<T>:IAsyncRepository<T> | |
{ | |
static WagStackAsyncRepository() |
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
/*global module:false*/ | |
module.exports = function(grunt) { | |
var log = grunt.log; | |
//grunt.loadTasks('grunt/tasks'); | |
function handleResult(from, dest, err, stdout, code, done) { | |
if(err){ | |
grunt.helper('growl', 'ERROR', stdout); | |
log.writeln(from + ': failed to compile to ' + dest + '.'); | |
log.writeln(stdout); |
NewerOlder