Skip to content

Instantly share code, notes, and snippets.

View ryanwebjackson's full-sized avatar

Ryan Jackson ryanwebjackson

View GitHub Profile
public class EasyEnum<T> : IEnumerable<object>
{
private List<object> _values;
private Type underlyingType;
public EasyEnum()
{
if (typeof(T).IsSubclassOf(typeof(Enum)))
{
this.underlyingType = Enum.GetUnderlyingType(typeof(T));
@ryanwebjackson
ryanwebjackson / LookedUpGitCommands.txt
Created October 3, 2017 01:09
Git commands I find myself looking up (in 2017)
# Remove untracked files, forced, including directories.
git clean -fd
# Compare files that have been changed, and staged for commit.
git diff --cached
@joelgriffith
joelgriffith / Login-Page.js
Created July 11, 2017 16:48
Simple React login-page for testing
import React, { Component } from 'react';
import './App.css';
class LoginPage extends Component {
constructor() {
super();
this.state = {
username: '',
password: '',
error: '',
@jchandra74
jchandra74 / PowerShell Customization.md
Last active May 23, 2025 19:18
PowerShell, Cmder / ConEmu, Posh-Git, Oh-My-Posh, Powerline Customization

Pimping Up Your PowerShell & Cmder with Posh-Git, Oh-My-Posh, & Powerline Fonts

Backstory (TLDR)

I work as a full-stack developer at work. We are a Windows & Azure shop, so we are using Windows as our development platform, hence this customization.

For my console needs, I am using Cmder which is based on ConEmu with PowerShell as my shell of choice.

Yes, yes, I know nowadays you can use the Linux subsystem on Windows 10 which allow you to run Ubuntu on Windows. If you are looking for customization of the Ubuntu bash shell, check out this article by Scott Hanselman.

@NinoFloris
NinoFloris / .cs
Created December 9, 2016 18:16
Mediator pipeline proof of concept
public delegate Task<TResponse> RequestHandlerDelegate<TResponse>(IAsyncRequest<TResponse> request);
public interface IRequestHandler<TRequest, TResponse> where TRequest : IAsyncRequest<TResponse>
{
Task<TResponse> Handle(TRequest message, RequestHandlerDelegate<TRequest, TResponse> next);
}
public class MediatorDecorator : IMediator
{
// [...]
@jrolstad
jrolstad / dev-machine-setup.ps1
Last active June 14, 2018 22:49
Dev Machine Setup Script in Powershell
# Install Chocolatey
iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))
# Install Git
choco install git -y
choco install tortoisegit -y
if (($env:Path.Split(';') -contains "C:\Program Files\Git\bin") -eq $false) {
$env:Path += ";C:\Program Files\Git\bin";
[System.Environment]::SetEnvironmentVariable("Path", $env:Path, [System.EnvironmentVariableTarget]::Machine );
@devster31
devster31 / example.html
Last active January 12, 2025 10:23
Bookmark parser for the NETSCAPE-Bookmark-file-1 format in node. Don't hesitate to comment with feedback.
<!DOCTYPE NETSCAPE-Bookmark-file-1>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
<!-- This is an automatically generated file.
It will be read and overwritten.
Do Not Edit! -->
<TITLE>Bookmarks</TITLE>
<H1>Bookmarks</H1>
<DL><p>
<DT><A HREF="https://developer.apple.com/library/mac/releasenotes/InterapplicationCommunication/RN-JavaScriptForAutomation/index.html#//apple_ref/doc/-%20uid/TP40014508" ADD_DATE="1414706885" PRIVATE="0" TAGS="javascript,mac,osx,yosemite">JavaScript for Automation Release Notes</A>
<DD>This article describes JavaScript for Automation, a new feature in OS X Yosemite.
// Vanilla version of FitVids
// Still licencened under WTFPL
//
// Not as robust and fault tolerant as the jQuery version.
// It's BYOCSS.
// And also, I don't support this at all whatsoever.
;(function(window, document, undefined) {
'use strict';
@ryanwebjackson
ryanwebjackson / MovingSchemas.cs
Last active September 20, 2023 15:31
Change schema for DbContext class - Entity Framework
protected override void OnModelCreating(DbModelBuilder modelBuilder)
{
modelBuilder.HasDefaultSchema("CUSTOM_SCHEMA");
base.OnModelCreating(modelBuilder);
}
@mickelsonm
mickelsonm / docker-present.md
Last active January 19, 2016 03:48
Docker for the Working Technologist Presentation

Docker for the Working Technologist

Container technologies, like Docker, are making their appearance in many technology shops across the globe. Come see some of my use cases for it and how “Dockerizing” things can be both fun and challenging. I am hoping that as a working technologist, you will find some use cases of your own and at the very least, it should provoke thought into how you are currently developing your tools or services within your own technology stacks.

Presentation given 11/16/2015

What's Docker?

https://www.docker.com/what-docker