Skip to content

Instantly share code, notes, and snippets.

View jbubriski's full-sized avatar

John Bubriski jbubriski

View GitHub Profile
@jakeonrails
jakeonrails / Ruby Notepad Bookmarklet
Created January 29, 2013 18:08
This bookmarklet gives you a code editor in your browser with a single click.
data:text/html, <style type="text/css">#e{position:absolute;top:0;right:0;bottom:0;left:0;}</style><div id="e"></div><script src="http://d1n0x3qji82z53.cloudfront.net/src-min-noconflict/ace.js" type="text/javascript" charset="utf-8"></script><script>var e=ace.edit("e");e.setTheme("ace/theme/monokai");e.getSession().setMode("ace/mode/ruby");</script>
@phoboslab
phoboslab / menus.js
Created November 11, 2012 22:13
Z-Type Menu
ig.module(
'game.menus'
)
.requires(
'impact.font'
)
.defines(function(){
MenuItem = ig.Class.extend({
getText: function(){ return 'none' },
@motowilliams
motowilliams / gist:3784042
Created September 25, 2012 19:51
motowilliams opml for Google Listen
<?xml version="1.0" encoding="UTF-8"?>
<opml version="1.0">
<head>
<title>"Listen Subscriptions" subscriptions via MotoWilliams in Google Reader</title>
</head>
<body>
<outline title="Listen Subscriptions" text="Listen Subscriptions">
<outline text="(406)Sta-rtup" title="(406)Sta-rtup"
type="rss" xmlUrl="http://406startup.com/feed/" htmlUrl="http://406startup.com"/>
@topas
topas / gist:1919858
Created February 26, 2012 23:48
ASP.NET MVC Html.LabelFor helper with html attributes
using System;
using System.Linq;
using System.Linq.Expressions;
using System.Web.Mvc;
using System.Web.Routing;
public static class LabelExtensions
{
public static MvcHtmlString LabelFor<TModel, TValue>(this HtmlHelper<TModel> html, Expression<Func<TModel, TValue>> expression, object htmlAttributes)
{
anonymous
anonymous / About.cshtml
Created November 10, 2011 14:27
Example of a base view for razor with RouteInfo property
@{
ViewBag.Title = "About Us";
}
<h2>About</h2>
<p>
Hi @RouteInfo.name(), welcome to the @RouteInfo.action() action, which is located in the @RouteInfo.controller() controller
</p>
@hallettj
hallettj / global-variables-are-bad.js
Created February 14, 2009 21:15
How and why to avoid global variables in JavaScript
// It is important to declare your variables.
(function() {
var foo = 'Hello, world!';
print(foo); //=> Hello, world!
})();
// Because if you don't, the become global variables.
(function() {