Skip to content

Instantly share code, notes, and snippets.

View danalexilewis's full-sized avatar

Daniel Lewis danalexilewis

View GitHub Profile

Welcome!

For feedback or suggestions, please send a tweet (@dideler). Gist comments don't notify me. Pull requests aren't possible with gists (yet), so I don't recommend forking because then I can't easily get the change.

Starring this gist will give me an idea of how many people consider this list useful.


Contents

@danalexilewis
danalexilewis / O.o.
Created September 19, 2014 04:38
GIS-Chaser, Code i am proud of
namespace GIS_Chaser.Models
{
public class GemModel
{
private IGemStorage _gemStorage { get; set; }
public GemModel(IGemStorage gemStorage)
{
_gemStorage = gemStorage;
}
@danalexilewis
danalexilewis / 0_reuse_code.js
Last active August 29, 2015 14:11
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
// ==UserScript==
// @name anilinkz
// @namespace anime
// @description getting rid of CM's dumb ass styling
// @include http://anilinkz.com/*
// @version 1
// @grant MIT Licence
// ==/UserScript==
function addGlobalStyle(css) {
@danalexilewis
danalexilewis / DIY Stack
Last active August 29, 2015 14:17
Demo of C# Diy Stack
using System;
using System.Collections;
namespace StackQueue
{
public class MyStack
{
object[] store = new object[0];
public void Push(object x)
@danalexilewis
danalexilewis / gist:2b2abf5f46e38959eda5
Created March 30, 2015 01:47
hihi - nunit test demo
using System;
using NUnit.Framework;
namespace UnitTestProject
{
[TestFixture]
public class UnitTest1
{
CleverCalcutor calcutor;
@danalexilewis
danalexilewis / Seed Method
Created April 9, 2015 04:25
Seed Method Using Faker
protected override void Seed(ClientSideApp.Models.PersonalProjectDbContext context)
+ {
+ // This method will be called after migrating to the latest version.
+
+ // You can use the DbSet<T>.AddOrUpdate() helper extension method
+ // to avoid creating duplicate seed data. E.g.
+ //
+ // context.People.AddOrUpdate(
+ // p => p.FullName,
+ // new Person { FullName = "Andrew Peters" },
@danalexilewis
danalexilewis / eda-cs-win-setup.ps1
Last active August 29, 2015 14:20
EDA BoxStarter
Set-ExplorerOptions -showHidenFilesFoldersDrives -showProtectedOSFiles -showFileExtensions
Enable-RemoteDesktop
Set-StartScreenOptions -EnableBootToDesktop
cinst git
cinst poshgit
cinst sublimetext2
cinst sublimetext2.powershellalias
cinst SQLite
cinst sqlite.shell
cinst visualstudiocommunity2013
@danalexilewis
danalexilewis / .jscsrc
Last active August 29, 2015 14:24
jscs file
{
"esnext": true,
"disallowSpacesInNamedFunctionExpression": {
"beforeOpeningRoundBrace": true
},
"disallowSpacesInFunctionExpression": {
"beforeOpeningRoundBrace": true
},
"disallowSpacesInAnonymousFunctionExpression": {
"beforeOpeningRoundBrace": true