Skip to content

Instantly share code, notes, and snippets.

@jaen
jaen / gist:3926212
Created October 21, 2012 07:10
Stylus support for Middleman
require "stylus"
module Middleman
module Renderers
# Sass renderer
module Stylus
# Setup extension
class << self
# Once registered
def registered(app)
@jaen
jaen / gist:3863583
Created October 10, 2012 06:56
UJS problem
# _share.html.haml button
= form_tag(public_memo_path(@memo), :remote => true, :style => 'margin-bottom: 5px;') do
= submit_tag "Make #{@memo.public? ? 'private' : 'public'}", :id => "make_public_button", :class=>"simple #{@memo.public? ? 'redish' : 'blue'} floatright", :disable_with => "Changing status..."
# memo_controller.rb, public action
def public
@memo = Memo.find(params[:id])
authorize! :share, @memo
#ifndef LINKEDTABLE_H_INCLUDED
#define LINKEDTABLE_H_INCLUDED
//--- includes
#include <stdio.h>
#include <string.h>
#include <malloc.h>
#ifdef HAS_OGL
#include <GL\glew.h>