Skip to content

Instantly share code, notes, and snippets.

View josefrichter's full-sized avatar

Josef Richter josefrichter

View GitHub Profile
{
"_id": "123",
"members": [
{
"_id": "789"
}
]
}
Josef-Richters-iMac:inspirace josefrichter2$ rake routes
(in /Users/josefrichter2/websites/inspirace)
WARNING: #<NameError: uninitialized constant Gem::VERSION>
# -*- encoding: utf-8 -*-
Gem::Specification.new do |s|
s.name = %q{rake}
s.version = "0.8.7"
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
require 'main'
require 'em-websocket'
EventMachine::WebSocket.start(:host => "0.0.0.0", :port => 8080) do |ws|
ws.onopen { ws.send "Hello Client!"}
ws.onmessage { |msg| ws.send "Pong: #{msg}" }
ws.onclose { puts "WebSocket closed" }
end
run Sinatra::Application
require 'redis'
require 'em-websocket'
require 'sinatra/base'
require 'sinatra'
SOCKETS = []
#@redis = Redis.new(:host => '127.0.0.1', :post => 6379)
@redis = Redis.new
require 'redis'
require 'em-websocket'
require 'sinatra/base'
#require 'sinatra'
require 'ruby-debug'
SOCKETS = []
REDIS = Redis.new(:host => '0.0.0.0', :port => 6379)
@josefrichter
josefrichter / dabblet.css
Created December 20, 2011 23:06
needed a border that doesn't start at the very top of a div
/* needed a border that doesn't start at the very top of a div */
/* the start position is set via background-position */
background-image:-moz-radial-gradient(#686868, #686868 100000px);
background-image:-webkit-radial-gradient(#686868, #686868 100000px);
background-image:radial-gradient(#686868, #686868 100000px);
background-position:100px 80px;
background-size:1px 100000px;
background-repeat:no-repeat;
@josefrichter
josefrichter / dabblet.css
Created August 23, 2012 16:23
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
.container {
width:50%;
}
img {
float:left;
@josefrichter
josefrichter / dabblet.css
Created August 28, 2012 14:06
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
.container {
width:50%;
position:relative;
}
img {
@josefrichter
josefrichter / dabblet.css
Created August 28, 2012 14:06
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
.container {
width:50%;
position:relative;
}
img {
class Idea < ActiveRecord::Base
# property :id, Serial
# property :name, String, length: 4..35
# property :desc, Text
#
# timestamps :at
#
attr_accessor :matched_i_seek
attr_accessor :matched_i_have
attr_accessor :matches_count