Skip to content

Instantly share code, notes, and snippets.

View jbubriski's full-sized avatar

John Bubriski jbubriski

View GitHub Profile
@jbubriski
jbubriski / RouteConfig.cs
Last active August 29, 2015 14:02
Sample route for additional route parameter.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.Routing;
namespace EnviromentRouteTest
{
public class RouteConfig
@jbubriski
jbubriski / bootstrap-blog.html
Last active August 29, 2015 14:02
Sample Blog in Bootstrap.
<!DOCTYPE html>
<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="">
<meta name="author" content="">
<link rel="shortcut icon" href="../../assets/ico/favicon.ico">
@jbubriski
jbubriski / CustomMacroMethods.cs
Created June 20, 2014 20:01
Custom Kentico Macro for outputting meta title and description for wildcard pages.
public static string GetProductSubsetFromItemID(int ItemID, string fieldName)
{
CustomTableItemProvider customTableProvider = new CustomTableItemProvider();
string customTableClassName = "customtable.TrimarkProducts";
DataClassInfo customTable = DataClassInfoProvider.GetDataClass(customTableClassName);
if (customTable != null)
{
string where = "ItemID = " + ItemID;
@jbubriski
jbubriski / readme.md
Created June 23, 2014 15:06
Kentico Developer Introduction Outline

Intro

  • Me
  • Wakefly
  • Kentico
  • What have people used?
  • Licensing
  • Dev Net
  • Market Place
  • Documentation
@jbubriski
jbubriski / Startup.Auth.cs
Created October 14, 2014 17:25
Sample of my auth code
using Microsoft.AspNet.Identity;
using Microsoft.AspNet.Identity.EntityFramework;
using Microsoft.AspNet.Identity.Owin;
using Microsoft.Owin;
using Microsoft.Owin.Security.Cookies;
using Microsoft.Owin.Security.DataProtection;
using Microsoft.Owin.Security.Google;
using Owin;
using System;
using ProCmsTraining.Models;
@jbubriski
jbubriski / unity-2d-game-dev-presentation-outline.md
Last active August 29, 2015 14:08
Unity 2D Game Dev Presentation outline

An Introduction To 2D Game Development With Unity

Intro

  • Self
  • What we will make
    • Doodle Jump Clone
  • What we wont cover
  • Art
@jbubriski
jbubriski / ObjectPooler.cs
Created January 16, 2015 18:05
Generic Object Pooler in Unity 3D
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
public class ObjectPooler : MonoBehaviour
{
private List<GameObject> _pooledObjects;
public static ObjectPooler Current;
public GameObject PooledObject;
@jbubriski
jbubriski / resize.js
Created February 5, 2015 20:24
Resizing a background image to match the same background image in another area.
var resizeSnapshotImage = function () {
// The 0.55 comes from the 55% setting for the background images background-position.
var backgroundImagePositionXPercentage = 0.55;
var backgroundImageWidth = 867;
var backgroundImageHeight = 857;
var borderSize = 4;
var snapshotOffset = jQuery('#box4').offset();
var snapshotMargin = jQuery('#box4').css('margin-top');
var backgroundOffset = jQuery('#box').offset();
@jbubriski
jbubriski / chris.sql
Created February 12, 2015 14:54
Custom Complex Kentico Degree Query
SELECT * FROM [custom_DegreePrograms]
WHERE School like '%business%' AND Modality LIKE '%online%' AND DegreeType = 'Concentration' AND DegreeProgramsID in (
SELECT [DocumentForeignKeyValue] FROM View_custom_DegreePrograms_Joined
WHERE [Published] = 1 AND [ClassName] LIKE 'custom.DegreePrograms' AND [DocumentID] in (
SELECT [DocumentID] FROM [CMS_DocumentCategory]
WHERE [CategoryID] in (
SELECT [CategoryID] FROM [CMS_DocumentCategory]
WHERE [DocumentID] = (
SELECT [DocumentID] FROM [View_custom_DegreePrograms_Joined]
@jbubriski
jbubriski / ObjectPoolingTest.cs
Last active August 29, 2015 14:16
Sort of an object pooling Console App example.
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ObjectPoolingTest
{
class Program