Skip to content

Instantly share code, notes, and snippets.


Donn Felker donnfelker

View GitHub Profile
View LineCount-PowerShell.ps1
(ls -filter "*.cs" -recurse | where { $_.PSIsContainer -eq $false -and (get-content($_.FullName)).Length -gt 1000 }).count
View CountLinesRecursive.ps1
(ls -filter "*.cs" -recurse | where { $_.PSIsContainer -eq $false -and (get-content($_.FullName)).Length -gt 1000 }).count
View NoDblClicl
var loadingUx = '<img src="<%=Url.Content("~/Images/ajax-loader.gif")%>" /> Loading';
$("#my-button-id").click(function () {
// Add loading gif to let user know some kind of party is going on while they wait
$(this).parent().append(loadingUx); // Button is in a div of its own
View aspnet mvc jquery form action modifier
<link href="css/jquery-ui-1.8.custom.css" rel="stylesheet" type="text/css" />
<script src="Scripts/jquery-1.4.2.min.js" type="text/javascript"></script>
<script src="Scripts/jquery-ui-1.8.custom.min.js" type="text/javascript"></script>
View ExampleQueries.cs
List<int> userIds = (from item in _userRepository.Fetch()
where item.Name.Contains(search)
|| item.Role.Name.Contains(search)
select item.User.Id);
// Or
var stuff = _repository.Fetch();
var result = stuff.Where(x => x.StuffId== someId && (x.StuffName == null || x.StuffType != null));
View Customer.cs
public class Customer
public string FirstName { get; set; }
public string LastName { get; set; }
public int CustomerNumber { get; set; }
public bool IsAwesomeAtFishingForChickenHawks { get; set; }
donnfelker / .gitconfig
Created Mar 21, 2011
My gitconfig for projects that use git-svn
View .gitconfig
editor = notepad++.exe
whitespace = nowarn
lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative
name = myname
email =
tool = diffmerge
donnfelker /
Created Apr 1, 2011
A custom Button that uses a custom font for all display.
package com.qonqr.views;
import android.content.Context;
import android.util.AttributeSet;
import android.widget.Button;
public class QButton extends Button {
View ApiPrincipal.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Principal;
using System.Text;
namespace Example.Core.Security
public class ApiPrincipal : GenericPrincipal
View main.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android=""