Skip to content

Instantly share code, notes, and snippets.

View wbsimms's full-sized avatar
💭
Working on a timer for open mic events

Barrett Simms wbsimms

💭
Working on a timer for open mic events
View GitHub Profile
@wbsimms
wbsimms / MainPage.xaml
Created August 15, 2016 21:55
CarouselPage Example
<?xml version="1.0" encoding="utf-8" ?>
<CarouselPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:Carasoul"
xmlns:controls="clr-namespace:Windows.UI.Xaml.Controls;assembly=Windows"
x:Class="Carasoul.MainPage">
<ContentPage x:Name="Page1">
<Grid>
<Grid.ColumnDefinitions>
namespace CookieService.Controllers
{
public class CatalogController : Controller
{
public CatalogController()
{
}
public JsonResult EchoCatalog()
@wbsimms
wbsimms / KODropdown.js
Last active November 9, 2015 16:06
KO Dropdown
function productSelectorViewModel(data) {
var self = this;
self.dataTier0 = ko.observableArray(data);
self.dataTier1 = ko.observableArray();
self.dataTier2 = ko.observableArray();
self.tier0Selection = ko.observable();
self.tier1Selection = ko.observable();
self.tier3Selection = ko.observable();
@wbsimms
wbsimms / gist:ee9289b90741a8ef3125
Last active October 20, 2015 18:59
Getting segment names
var collection = client.GetCategoryContentCoreCollection(new ProductContentCollectionRequest()
{
ProductContentItems = new ProductContentItem[]
{
new ProductContentItem() {ProductCode = "dell-3130cn"}
},
Context =
new AppFrameworkContextData()
{
GlobalizationInfo =
ElasticClient client = new ElasticClient(new ConnectionSettings(new Uri("http://localhost:9200"),"index"));
var result = client.Search<IndexType>(x => x.SearchType(SearchType.Scan)
.Size(1)
.Scroll("12s"));
Assert.IsNotNull(result);
var docCount = result.Documents.Count();
Console.WriteLine("count :"+docCount);
var results2 = client.Scroll<IndexType>(x => x.Scroll("12s").ScrollId(result.ScrollId));
var docCount2 = results2.Documents.Count();
@wbsimms
wbsimms / Program.java
Last active August 29, 2015 14:21
Intellectual Façade Generator
package com.wbsimms.bullshitgenerator;
import java.io.*;
import java.util.*;
/**
*
* @author Wm.Barrett
*/
public class Program {
@wbsimms
wbsimms / gist:e1ba771a5196e2e70424
Created April 30, 2015 18:36
TestControllerContext
using System.Security.Principal;
using System.Web;
using System.Web.Mvc;
namespace PracticeTime.Web.Test.Controllers
{
public class TestControllerContext : ControllerContext
{
private string userName = "student";
public string UserName
@wbsimms
wbsimms / keybase.md
Created April 14, 2015 20:56
keybase.md

Keybase proof

I hereby claim:

  • I am wbsimms on github.
  • I am wbsimms (https://keybase.io/wbsimms) on keybase.
  • I have a public key whose fingerprint is 8A80 BBE9 3816 7E7F 04C4 2432 655E 35EF 51E9 400E

To claim this, I am signing this object:

@wbsimms
wbsimms / resharper_mvvmlight_dependencyProperty
Created February 9, 2014 22:38
Resharper Template for MVVM Light Toolkit dependency properties
public const string $name$PropertyName = "$name$";
private $type$ $lname$ = new $type$();
public $type$ $name$
{
get
{
return this.$lname$;
}
set
{