Skip to content

Instantly share code, notes, and snippets.

Ryan Cromwell cromwellryan

Block or report user

Report or block cromwellryan

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@cromwellryan
cromwellryan / PrependZerosWithPS
Created May 25, 2011
Prepend Zeros to files via PS
View PrependZerosWithPS
function number-part($name) { return $name.Split(' ')[0] }
function prepend-if-needed($fi) {
$numberpart = number-part $fi.Name
$potentialnewname = "0" + $fi.Name
if( $numberpart.length -lt 2 ) { ren -Path $fi.FullName -NewName $potentialnewname }
}
ls | foreach { prepend-if-needed $_ }
View GitHubSender.cs
using EchelonTouchInc.Gister.Api.Credentials;
namespace EchelonTouchInc.Gister.Api
{
public interface GitHubSender
{
string SendGist(string fileName, string content, GitHubCredentials credentials);
}
}
@cromwellryan
cromwellryan / Task.js
Created Jan 24, 2012
Knockout & Jasmine not mixing well
View Task.js
var TASKLISTMODULE = (function(module) {
module.Task = function (name, owner, duedate, status) {
var self = this;
self.name = ko.observable(name || '');
self.owner = ko.observable(owner || '');
self.duedate = ko.observable(duedate);
self.status = status || 'unassigned';
@cromwellryan
cromwellryan / Abstract.txt
Created Jan 26, 2012
Rock your development environment!
View Abstract.txt
Rock your development environment!
You see Visual Studio more than you see your family. Make your tools rock for you! In this session
we'll look at extensions, tools, customizations, and patterns to developing on the .Net stack which
can have you fly through code like Chipotle through a geek.
@cromwellryan
cromwellryan / age.coffee
Created Feb 14, 2012
CoffeeScript Birthday
View age.coffee
age = (bday) ->
// now - bday
17
View RetrievesUserEnteredCredentials.cs
using System;
using EchelonTouchInc.Gister.Api;
using EchelonTouchInc.Gister.Api.Credentials;
namespace EchelonTouchInc.Gister
{
public class RetrievesUserEnteredCredentials : RetrievesCredentials
{
public RetrievesUserEnteredCredentials()
{
View RetrievesUserEnteredCredentials.cs
using System;
using EchelonTouchInc.Gister.Api;
using EchelonTouchInc.Gister.Api.Credentials;
namespace EchelonTouchInc.Gister
{
public class RetrievesUserEnteredCredentials : RetrievesCredentials
{
public RetrievesUserEnteredCredentials()
{
View MyWebApiIntegrationTests.cs
[TestFixture]
public class MyWebApiIntegrationTests
{
[Test]
public void ShouldWorkWithWebApi4()
{
var config = new HttpSelfHostConfiguration("http://localhost:8080");
View DriverFactory.cs
using System;
using OpenQA.Selenium;
using OpenQA.Selenium.IE;
using OpenQA.Selenium.Internal;
namespace AtddDotNetSpecs.StepDefinitions
{
public class DriverFactory
{
static InternetExplorerDriver currentWebDriver;
View git.ps1
function Start-GitFetch() {
pushd .
cd ~/vim-config
git fetch origin
cd ~/git-config
git fetch origin master
cd ~/ps-config
git fetch origin master
You can’t perform that action at this time.