Skip to content

Instantly share code, notes, and snippets.

View fpauser's full-sized avatar

Falk Pauser fpauser

View GitHub Profile
<!DOCTYPE html>
<html>
<head>
<script src="http://code.jquery.com/jquery-1.11.0.min.js"></script>
<script src="http://code.jquery.com/ui/1.10.4/jquery-ui.min.js"></script>
<meta charset="utf-8">
<title>JS Bin</title>
<style>
#app {
width:300px;
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>JS Bin</title>
<style id="jsbin-css">
#table-container {
position:absolute;
top:100px;
left:100px;
class GameOfLife
attr_reader :width, :height, :cells
def initialize(width = 5, height = 5, seed = 5)
raise ArgumentError.new "Seed must be < than width x height!" if seed >= width * height
@width, @height = width, height
@cells = Array.new(width * height, 0)
@cells[rand(cells.size)] = 1 while cells.select{|c| c == 1}.size < seed
end
source 'http://rubygems.org'
gem 'rails', '3.0.0.rc2'
# Bundle edge Rails instead:
#gem 'rails', :git => 'git://github.com/rails/rails.git', :branch => "3-0-stable"
gem 'mysql2'
gem 'awesome_print', :require => 'ap'
gem 'rails3-generators', "0.12.1"
/usr/lib/ruby/1.8/rubygems/package/tar_input.rb:49:in `initialize': not in gzip format (Zlib::GzipFile::Error)
from /usr/lib/ruby/1.8/rubygems/package/tar_input.rb:49:in `new'
from /usr/lib/ruby/1.8/rubygems/package/tar_input.rb:49:in `initialize'
from /usr/lib/ruby/1.8/rubygems/package/tar_reader.rb:64:in `each'
from /usr/lib/ruby/1.8/rubygems/package/tar_reader.rb:55:in `loop'
from /usr/lib/ruby/1.8/rubygems/package/tar_reader.rb:55:in `each'
from /usr/lib/ruby/1.8/rubygems/package/tar_input.rb:32:in `initialize'
from /usr/lib/ruby/1.8/rubygems/package/tar_input.rb:17:in `new'
from /usr/lib/ruby/1.8/rubygems/package/tar_input.rb:17:in `open'
from /usr/lib/ruby/1.8/rubygems/package.rb:58:in `open'
$ gem install mysql2 --debug
Exception `NameError' at /home/fpauser/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/site_ruby/1.8/rubygems/command_manager.rb:164 - uninitialized constant Gem::Commands::InstallCommand
Exception `NoMethodError' at /home/fpauser/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/rational.rb:78 - undefined method `gcd' for Rational(1, 2):Rational
Exception `Gem::LoadError' at /home/fpauser/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/site_ruby/1.8/rubygems.rb:779 - Could not find RubyGem test-unit (>= 0)
Exception `Gem::LoadError' at /home/fpauser/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/site_ruby/1.8/rubygems.rb:779 - Could not find RubyGem sources (> 0.0.1)
Exception `IOError' at /home/fpauser/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/site_ruby/1.8/rubygems/format.rb:50 - closed stream
Exception `Errno::EEXIST' at /home/fpauser/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/fileutils.rb:243 - File exists - /home/fpauser/.rvm/gems/ruby-1.8.7-p302
Exception `Errno::EEXIST' at /home/fpauser/.rvm/rubies/ruby-1.8.7-p302/lib
@fpauser
fpauser / application.controller.js
Last active September 15, 2015 22:07
New Twiddle
import Ember from 'ember';
export default Ember.Controller.extend({
appName:'Ember Twiddle'
});
import Ember from 'ember';
export default Ember.Controller.extend({
appName:'Ember Twiddle'
});
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
[ -z "$PS1" ] && return
# don't put duplicate lines in the history. See bash(1) for more options
# ... or force ignoredups and ignorespace
HISTCONTROL=ignoredups:ignorespace
@fpauser
fpauser / Dumple
Created November 8, 2010 12:45 — forked from bouchard/Dumple
#!/usr/bin/env ruby
## Modified from Gem Session's Dumple, available at:
## http://gem-session.com/2010/07/dumping-database-from-within-rails-project
fail_gently = ARGV.include?("--fail-gently")
gzip = ARGV.include?("--compress")
if ARGV.include?("-i")
puts "*******************************************************"