Skip to content

Instantly share code, notes, and snippets.

View keroger2k's full-sized avatar

Kyle Rogers keroger2k

View GitHub Profile
@keroger2k
keroger2k / TV
Last active April 11, 2018 18:01
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="Write an awesome description for your new site here. You can edit this line in _config.yml. It will appear in your document head meta (for Google search resu...">
@keroger2k
keroger2k / kyle
Last active February 22, 2018 04:26
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="Write an awesome description for your new site here. You can edit this line in _config.yml. It will appear in your document head meta (for Google search resu...">
PAFB-C00-CR-01#sh ip route
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
a - application route
+ - replicated route, % - next hop override, p - overrides from PfR
C:\Users\kyle.36TECHNOLOGY\Documents\Visual Studio 2015\Projects\MusicStore-dev\src\MusicStore>dnu restore
Microsoft .NET Development Utility Clr-x86-1.0.0-rc2-16357
CACHE https://www.nuget.org/api/v2/
CACHE https://www.myget.org/F/aspnetcidev/api/v3/index.json
CACHE https://api.nuget.org/v3/index.json
Restoring packages for C:\Users\kyle.36TECHNOLOGY\Documents\Visual Studio 2015\Projects\MusicStore-dev\src\MusicStore\project.json
CACHE https://www.nuget.org/api/v2/FindPackagesById()?id='Microsoft.EntityFrameworkCore.InMemory'
CACHE https://www.myget.org/F/aspnetcidev/api/v3/flatcontainer/microsoft.entityframeworkcore.inmemory/index.json
GET https://api.nuget.org/v3-flatcontainer/microsoft.entityframeworkcore.inmemory/index.json
@keroger2k
keroger2k / gist:474d761f4a59f6c89007
Created November 10, 2014 17:17
Nest API Starter
class Program
{
const string CLIENT_ID = @"my_client_id";
const string CLIENT_SECRET = @"my_secret";
const string DEVICE_ID = @"my_device_id";
const string AUTH_CODE_URL = @"https://home.nest.com/login/oauth2?client_id=a6e9c798-52ba-46ff-8a7d-ecccb9e2ae75&state=STATE";
const string AUTH_CODE = @"my_auth_code";
const string ACCESS_TOKEN_URL = @"https://api.home.nest.com/oauth2/access_token?client_id={0}&code={1}&client_secret={2}&grant_type=authorization_code";
<!--[if lt IE 9]>
<script src="/js/respond.min.js" type="text/javascript"></script>
<link href="/css/ie.css" rel="stylesheet" type="text/css" />
<![endif]-->
@keroger2k
keroger2k / EnumExtensions.cs
Created September 15, 2012 02:24
EnumToSelectList
public static SelectList ToSelectList<TEnum>(this TEnum enumObj)
{
var values = from TEnum e in Enum.GetValues(typeof(TEnum))
select new { Value = e, Text = e.ToString() };
return new SelectList(values, "Value", "Text", enumObj);
}
@keroger2k
keroger2k / IPHelper.cs
Created June 6, 2012 19:50
IPHelper Class
public class IPHelper : IIPHelper {
/// <summary>
/// Verifies IP Address is Valid
/// </summary>
public bool ip_inside_range(string subnet, string ipAddress) {
string[] token = subnet.Split('/');
string mask = token[1].Contains(".") ? token[1] : ip_cidrtomask(byte.Parse(token[1]));
uint networkAddress = ip_iptouint(ip_networkAddress(token[0], mask));
uint broadcastAddress = ip_iptouint(ip_broadcastAddress(token[0], mask));
uint ip = ip_iptouint(ipAddress);
@keroger2k
keroger2k / Gemfile
Created June 1, 2012 03:31
Skeleton Sinatra Application
source 'http://rubygems.org'
gem 'rack'
gem 'rake'
gem 'sinatra'
gem 'mustache'
gem 'foreman'
gem 'thin'
group :test do
gem 'rack-test'