Skip to content

Instantly share code, notes, and snippets.

View ferventcoder's full-sized avatar
🎯
Focusing

Rob Reynolds ferventcoder

🎯
Focusing
View GitHub Profile
[alias]
spull = !git checkout master && git svn rebase
spush = !git checkout master && git svn dcommit
work = !git checkout work && git rebase master
prepwork = !git checkout work && git rebase master && git checkout master && git merge work
@ferventcoder
ferventcoder / .gitconfig
Created October 8, 2012 14:13
Git Alias for pushing changes and syncing up
[alias]
sendwork = !git checkout work && git rebase master && git checkout master && git merge work && git svn dcommit && git svn rebase && git checkout work && git rebase master
@ferventcoder
ferventcoder / setup.ps1
Last active February 25, 2025 06:02
Really rocking out the environment setup
$scriptDir = $(Split-Path -parent $MyInvocation.MyCommand.Definition)
function Install-NeededFor {
param(
[string] $packageName = ''
,[bool] $defaultAnswer = $true
)
if ($packageName -eq '') {return $false}
$yes = '6'
@ferventcoder
ferventcoder / RemoveListItem.cs
Created September 24, 2012 22:29
How to Remove Items from A List ?
foreach (var item in items.ToList())
{
items.Remove(item);
}
@ferventcoder
ferventcoder / CassetteConfiguration.cs
Created September 21, 2012 06:16
Cassette Configuration
/// <summary>
/// Bundles the Javascript and CSS files for the web application based on conventions set here.
/// </summary>
public class CassetteConfiguration : ICassetteConfiguration
{
/// <summary>
/// Configures the specified bundles.
/// </summary>
/// <param name="bundles">The bundles.</param>
/// <param name="settings">The settings.</param>
@ferventcoder
ferventcoder / Chocolatey goodness - What....md
Created September 16, 2012 03:33
Session Submissions for Iowa Code Camp - http://www.iowacodecamp.com

Chocolatey is a global PowerShell execution engine. What does that mean? I'm not sure but it does some really cool stuff.

For instance, if you lose your car keys you can just pull up a command line and type - chocolatey where are my keys? and it will respond with "Please run chocolatey /? or chocolatey help".

Okay bad example, but it definitely does some cool things like save you time and make you look uber smart for using it. Come see what this thing is and what it can do for you.

"Sometimes it's the tools that make the man." -Rob Reynolds, like 2 seconds ago

@ferventcoder
ferventcoder / 0GenericRepository.cs
Created August 16, 2012 17:21
Db First Generic Repository with DbFirst Model First - allows use of stored procedures transparently - it's no coincidence that the IRepository is the same as code first implements
public class EntityFrameworkDatabaseFirstRepository : IRepository
{
private readonly IDatabaseFirstDataContext _dataContext;
/// <summary>
/// Gets the data context.
/// </summary>
protected IDatabaseFirstDataContext DataContext
{
get
@ferventcoder
ferventcoder / 1Registration.cs
Created July 17, 2012 22:56
WebBackgrounder - IoC improvements
Bind<IJob>().ToMethod(context => new SyncWithMeetingsJob(context.Kernel, interval: TimeSpan.FromMinutes(Config.GetConfigurationSettings().MeetingsMinutesBetweenUpdates), timeout: TimeSpan.FromMinutes(20))).InSingletonScope();
@ferventcoder
ferventcoder / 1Response.json
Created July 12, 2012 22:47
RestSharp Issue - Response With Different Named Types - How do you set this up?
"votePerOption":[{"Option1Votes":0},{"Option2Votes":1},{"Option3Votes":2},{"Option4Votes":1}]
public class SomeClass {
public void SomeMethod() {
this.Log().Info(() => "Here is a log message with params which can be in Razor Views as well: '{0}'".FormatWith(typeof(SomeClass).Name));
}
}