Skip to content

Instantly share code, notes, and snippets.

@rogerbraun
rogerbraun / bootstrap.css
Last active December 12, 2015 09:58
Popover
/*!
* Bootstrap v2.3.0
*
* Copyright 2012 Twitter, Inc
* Licensed under the Apache License v2.0
* http://www.apache.org/licenses/LICENSE-2.0
*
* Designed and built with all the love in the world @twitter by @mdo and @fat.
*/
@rogerbraun
rogerbraun / Gemfile
Last active December 12, 2015 03:48
Picky Realtime Indexing
gem 'picky'
gem 'redis'
gem 'sinatra', require: 'sinatra/base'
gem 'rack-test'
gem 'pry'
@rogerbraun
rogerbraun / js.js
Created March 29, 2012 21:49
Folgende zusammenfügen
var rising = function(res, el) {
var subArr = res[res.length - 1];
if(subArr && ((subArr[subArr.length - 1] + 1) == el)) {
subArr.push(el);
} else {
res.push([el]);
}
return res;
}
@rogerbraun
rogerbraun / index.html
Created February 26, 2012 21:17
Snaaaake
<html>
<head>
<link rel="stylesheet" href="style.css" />
<script src="script.js"></script>
</head>
<body>
<h1>Canvas</h1>
<p>
<button id="button">start</button>
@rogerbraun
rogerbraun / index.html
Created February 15, 2012 15:19
Dragging a div, dynamically created
<!DOCTYPE html>
<html>
<head>
<title>Drag</title>
<script src="script.js"></script>
</head>
<body>
<div id="normal">
<h1>Drag-Test</h1>
<p>Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet. </p>
@rogerbraun
rogerbraun / index.html
Created February 15, 2012 13:42
Dragging a div
<!DOCTYPE html>
<html>
<head>
<title>Drag</title>
<link rel="stylesheet" href="style.css" />
<script src="script.js"></script>
</head>
<body>
<div id="normal">
<h1>Drag-Test</h1>
@rogerbraun
rogerbraun / .jsonp.js.swp
Created February 11, 2012 17:37
JSONP example 2
@rogerbraun
rogerbraun / index.html
Created February 10, 2012 22:54
JSONP
<!DOCTYPE html>
<html>
<head>
<title>JSON-P Example</title>
<script src="jsonp.js"></script>
</head>
<body>
<h1>A simple JSON-P example</h1>
<p>This is a Google Image Search.</p>
<input id="q" />
@rogerbraun
rogerbraun / find_8001.rb
Created February 10, 2012 17:47
Embed.ly challenge
def check_number(n)
n_f = 1.upto(n).inject(&:*)
sum_of_digits = n_f.to_s.each_char.inject(0) do |res, v|
res += v.to_i
end
[n_f, sum_of_digits]
end
found = false
i = 1
@rogerbraun
rogerbraun / bug.rb
Created January 24, 2012 09:50
Test for a Picky bug
require "picky"
class JapanObject
attr_accessor :id
@@id = 0
def initialize
@id = @@id +=1