Skip to content

Instantly share code, notes, and snippets.

View jbubriski's full-sized avatar

John Bubriski jbubriski

View GitHub Profile
@jbubriski
jbubriski / MassiveFluently.cs
Created January 6, 2012 18:35 — forked from codeimpossible/MassiveFluently.cs
Massive Fluently rough draft
using System;
using System.Dynamic;
using System.Linq;
using Massive;
using Massive.Expressions;
public class Test
{
public void TestMethod( )
{
@jbubriski
jbubriski / MassiveFluently.cs
Created January 6, 2012 18:45 — forked from codeimpossible/MassiveFluently.cs
Massive Fluently rough draft
using System;
using System.Dynamic;
using System.Linq;
using Massive;
using Massive.Expressions;
public class Test
{
public void TestMethod()
{
@jbubriski
jbubriski / gist:3207278
Created July 30, 2012 14:22 — forked from codeimpossible/gist:3207268
Cache locking with timeout.
private static readonly string _languagesKey = "languages";
public static Dictionary<string, string> GetLanguages()
{
return GetData(_languagesKey, 15, () =>
{
// TODO: Get data from language service
var languages = new Dictionary<string, string>();
return languages;
@jbubriski
jbubriski / touch-button.js
Created December 9, 2012 16:09 — forked from phoboslab/touch-button.js
Touch Button Plugin for Impact
ig.module(
'plugins.touch-button'
)
.requires(
'impact.system',
'impact.input',
'impact.image'
)
.defines(function(){
<?
/**
Written by James Laughlin
http://developer.pardot.com/discussions/questions/55-php-login-example
There seems to be little on this forum that is language specific, so If you are using Drupal or Wordpress, you'll need to build interfaces to Pardot in PHP at some point. Here's a function you can use to retrieve your Pardot credentials in one array object so that you can make your API calls.
**/
// the pardot API key is only good for an hour
// so it's best to get it before every API call
function get_pardot_credentials(){

Hello there! This is a sample post for gist.io, a super-lightweight writing soapbox for hackers.

Now look up. Further. Above the post title. See that grey text with the gist ID?

Now back to me. That grey text is a link! Open that sucker in a new tab to see the source for this post. Also, I'm on a horse.

This is a major heading

If you peek at it with a web inspector, you'll see that it is a second-level heading. You can use first level headings, but they'll look just like the second level ones, and the gods of the HTML5 outlining algorithm will frown upon you.

body {
margin: 0px;
padding: 0px;
}
#player {
width: 100%;
height: 100%;
}
public string GetProductCategory()
{
var category = GetFirstCategory(CurrentDocument);
if (category != null)
{
var qsvalue = category.CategoryID;
return "?subject=" + qsvalue;
}
<rewrite>
<!-- Have a bunch of redirects? Put them in a separate file -->
<rules configSource="Rewrites.config" />
<rules>
<!-- Simple rewrite -->
<rule name="Simple redirect" stopProcessing="true">
<match url="^path/sub path/page\.aspx$" />
<action type="Rewrite" url="/newpath.aspx" />
#!/usr/bin/env python
# saved to ~/bin/batcharge.py and from
# http://stevelosh.com/blog/2010/02/my-extravagant-zsh-prompt/#my-right-prompt-battery-capacity
#!/usr/bin/env python
# coding=UTF-8
import math, subprocess
p = subprocess.Popen(["ioreg", "-rc", "AppleSmartBattery"], stdout=subprocess.PIPE)
output = p.communicate()[0]