This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
project(sos2) | |
add_executable(circles circles.c Circle.c Object.c Point.c) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# | |
# Copies domain information from Linode to rackspace | |
# | |
# Environment variables that should be set: | |
# | |
# LINODE_TOKEN | |
# RACKSPACE_USERNAME | |
# RACKSPACE_API_KEY | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include "circle.h" | |
#include "new.h" | |
static void *Circle_ctor(void *_self, va_list *app) { | |
struct Circle *self = ((const struct Class *)Point)->ctor(_self, app); | |
self->rad = va_arg(*app, int); | |
return self; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -e | |
# | |
# Since unicorn creates a new pid on restart/reload, it needs a little extra love to | |
# manage with runit. Instead of managing unicorn directly, we simply trap signal calls | |
# to the service and redirect them to unicorn directly. | |
# | |
# To make this work properly with RVM, you should create a wrapper for the app's gemset unicorn. | |
# | |
function is_unicorn_alive { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ProductImageUploader < CarrierWave::Uploader::Base | |
include CarrierWave::RMagick | |
# ... | |
version :micro do | |
process imagecore_square: 50 | |
end | |
# ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class SearchesController < ApplicationController | |
before_filter :authenticate | |
def show | |
@scope = params[:scope] | |
@query = params[:q] | |
unless @query.blank? | |
@product_searcher = build_product_searcher | |
member_searcher = build_member_searcher |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/home/od/work/oss/sass/lib/sass/plugin/staleness_checker.rb:169:in `tree' | |
/home/od/work/oss/sass/lib/sass/plugin/staleness_checker.rb:159:in `compute_dependencies' | |
/home/od/work/oss/sass/lib/sass/plugin/staleness_checker.rb:142:in `dependencies' | |
/home/od/work/oss/sass/lib/sass/plugin/staleness_checker.rb:119:in `dependencies_stale?' | |
/home/od/work/oss/sass/lib/sass/plugin/staleness_checker.rb:154:in `block in dependency_updated?' | |
/home/od/work/oss/sass/lib/sass/plugin/staleness_checker.rb:119:in `each' | |
/home/od/work/oss/sass/lib/sass/plugin/staleness_checker.rb:119:in `any?' | |
/home/od/work/oss/sass/lib/sass/plugin/staleness_checker.rb:119:in `dependencies_stale?' | |
/home/od/work/oss/sass/lib/sass/plugin/staleness_checker.rb:154:in `block in dependency_updated?' | |
/home/od/work/oss/sass/lib/sass/plugin/staleness_checker.rb:75:in `call' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Ability | |
include CanCan::Ability | |
def initialize(user) | |
@user = user | |
if user | |
can :complain, Post do |post| | |
post.user != user | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
~/ext/pulled/riak [master]% make | |
./rebar get-deps | |
==> cluster_info (get-deps) | |
==> skerl (get-deps) | |
==> protobuffs (get-deps) | |
==> basho_stats (get-deps) | |
==> riak_sysmon (get-deps) | |
==> mochiweb (get-deps) | |
==> webmachine (get-deps) | |
==> riak_core (get-deps) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if @message.save | |
if request.xhr? | |
render :nothing => true | |
else | |
flash[:notice] = 'Message sent!' | |
redirect_to messages_path | |
end | |
else | |
render :new, :layout => !request.xhr? |