Skip to content

Instantly share code, notes, and snippets.

Avatar

Michael Carter kiliman

View GitHub Profile
@kiliman
kiliman / Index.cs
Last active August 29, 2015 13:56
Simple RavenDB clone using SQLite for use in mobile clients.
View Index.cs
public class IndexResult
{
[PrimaryKey, AutoIncrement]
public int Id { get; set; }
[Indexed]
public string DocumentId { get; set; }
}
public class PersonIndex : IndexResult
@kiliman
kiliman / packages.config
Created April 24, 2014 21:20
Default packages in C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET MVC 4\Packages
View packages.config
<packages>
<package id="DotNetOpenAuth.AspNet" version="4.1.4.12333" />
<package id="DotNetOpenAuth.Core" version="4.1.4.12333" />
<package id="DotNetOpenAuth.OAuth.Consumer" version="4.1.4.12333" />
<package id="DotNetOpenAuth.OAuth.Core" version="4.1.4.12333" />
<package id="DotNetOpenAuth.OpenId.Core" version="4.1.4.12333" />
<package id="DotNetOpenAuth.OpenId.RelyingParty" version="4.1.4.12333" />
<package id="EntityFramework" version="5.0.0" />
<package id="Facebook" version="6.1.4" />
<package id="jQuery" version="1.8.2" />
View loader.rb
def gem_available?
if @version == nil
Gem.available? @gem_name
else
Gem.available? @gem_name, @version
end
end
View gist:902303
Server Error in '/' Application.
The profiler was not initialize properly, did you forgot to call Profiler.Initialize()?
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.InvalidOperationException: The profiler was not initialize properly, did you forgot to call Profiler.Initialize()?
Source Error:
@kiliman
kiliman / AllMethods.cs
Created November 12, 2012 16:01 — forked from davidfowl/AllMethods.cs
Blog Post
View AllMethods.cs
public class Chat : Hub
{
public void Send(string message)
{
// Call addMessage on everyone
Clients.All.addMessage(message);
// Call addMessage on everyone except the caller
Clients.Others.addMessage(message);
@kiliman
kiliman / .SyncIgnore
Last active December 8, 2015 05:52
BitTorrent Sync ignore file for WIndows<->Mac Xamarin Development
View .SyncIgnore
# .SyncIgnore is a UTF-8 encoded .txt file that helps you specify single files, paths and rules
# for ignoring during the synchronization job. It supports "?" and "*" wildcard symbols.
#
#
# OS generated files #
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
@kiliman
kiliman / DynamicFragmentView.cs
Last active February 5, 2016 18:49
Dynamic Layout in MvvmCross for Android
View DynamicFragmentView.cs
public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
{
var tabConfig = ViewModel.TabConfig;
var tabId = tabConfig["id"].ToString();
var ignored = base.OnCreateView(inflater, container, savedInstanceState);
_scrollView = new ScrollView(Activity);
var layout = BuildLayout(inflater, tabConfig);
View gist:0be7b26d827c63cb5a95846c6a5a36c7
Verifying that "kiliman.id" is my Blockstack ID. https://onename.com/kiliman
@kiliman
kiliman / LinqPadPrecompiler.cs
Created February 29, 2012 22:01
LinqPadPrecompiler for CS-Script http://www.csscript.net/
View LinqPadPrecompiler.cs
// Written by Michael Carter (kiliman@systemex.net)
// Copyright (c) 2012. All rights reserved.
//
// Redistribution and use of this code WITHOUT MODIFICATIONS are permitted provided that
// the following conditions are met:
// 1. Redistributions must retain the above copyright notice, this list of conditions
// and the following disclaimer.
// 2. Neither the name of an author nor the names of the contributors may be used
// to endorse or promote products derived from this software without specific
// prior written permission.
View sample.txt
// this is a comment
const func = (a, b, c, d, e, f, s, n) => {
if (a++ && b-- || c >= d || e <= f) {
}
if (s === 'string' && n !== 999) {
}
if (a == b && c != d)
a <- b <-- c <== d
a |> b