Skip to content

Instantly share code, notes, and snippets.

@grk
grk / semaphore_t.hpp
Created June 6, 2011 07:15
OS X semaphore
#ifndef __semaphore_t_h__
#define __semaphore_t_h__
#ifdef __APPLE__
#include <mach/mach_init.h>
#include <mach/task.h>
#include <mach/semaphore.h>
class semaph_t

Keybase proof

I hereby claim:

  • I am grk on github.
  • I am grk (https://keybase.io/grk) on keybase.
  • I have a public key whose fingerprint is B77C 9105 1DFD 0CF4 7401 FD15 14C6 DB7E EFF5 4934

To claim this, I am signing this object:

source "https://rubygems.org"
gem 'faraday'
gem 'faraday_middleware'
gem 'active_support'
@import "bootstrap/reset";
@import "bootstrap/variables";
// overwrite variables here
@import "bootstrap/mixins";
@import "bootstrap/scaffolding";
@grk
grk / config_initializers_sass.rb
Created May 30, 2011 07:33
Sass load paths Rails 3.1
Sass::Engine::DEFAULT_OPTIONS[:load_paths].tap do |load_paths|
load_paths << "#{Rails.root}/app/assets/stylesheets"
load_paths << "#{Gem.loaded_specs['compass'].full_gem_path}/frameworks/compass/stylesheets"
load_paths << "#{Gem.loaded_specs['html5-boilerplate'].full_gem_path}/stylesheets"
load_paths << "#{Gem.loaded_specs['fancy-buttons'].full_gem_path}/lib/stylesheets"
end
photos.each do |photo|
photo.position = params[:photo].index(photo.id.to_s)
end
@grk
grk / github_projects.rb
Created May 7, 2011 10:30
Github repos in Jekyll
require 'octokit'
module Jekyll
class ProjectsIndex < Page
def initialize(site, base, projects_dir)
@site = site
@base = base
@dir = projects_dir
@name = 'index.html'
#ifndef __fine_linked_list_hpp__
#define __fine_linked_list_hpp__
#include "linked_list.hpp"
using namespace std;
template <typename T>
class fine_linked_list : public linked_list<T>
{
#ifndef __fine_linked_list_hpp__
#define __fine_linked_list_hpp__
#include "linked_list.hpp"
using namespace std;
template <typename T>
class fine_linked_list : public linked_list<T>
{
/*
* Copyright 1993-2006 NVIDIA Corporation. All rights reserved.
*
* NOTICE TO USER:
*
* This source code is subject to NVIDIA ownership rights under U.S. and
* international Copyright laws.
*
* This software and the information contained herein is PROPRIETARY and
* CONFIDENTIAL to NVIDIA and is being provided under the terms and