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
[info] - should respond with error | |
Feb 05, 2014 2:13:41 PM com.twitter.logging.Logger log | |
ERROR: Internal Server Error | |
com.fasterxml.jackson.databind.JsonMappingException: Infinite recursion (StackOverflowError) (through reference chain: com.omc.corona.anon$1["factory"]->com.fasterxml.jackson.databind.MappingJsonFactory["codec"]->com.omc.corona.anon$1["factory"]->com.fasterxml.jackson.databind.MappingJsonFactory["codec"]->com.omc.corona.anon$1["factory"]->com.fasterxml.jackson.databind.MappingJsonFactory["codec"]->com.omc.corona.anon$1["factory"]->com.fasterxml.jackson.databind.MappingJsonFactory["codec"]->com.omc.corona.anon$1["factory"]->com.fasterxml.jackson.databind.MappingJsonFactory["codec"]->com.omc.corona.anon$1["factory"]->com.fasterxml.jackson.databind.MappingJsonFactory["codec"]->com.omc.corona.anon$1["factory"]->com.fasterxml.jackson.databind.MappingJsonFactory["codec"]->com.omc.corona.anon$1["factory"]->com.fasterxml.jackson.databind.MappingJsonFactory["codec"]->com.omc.corona.anon$1["factory"]-> |
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
qt.qpa.input: evdevmouse: Using device discovery | |
qt.qpa.input: udev device discovery for type QFlags(0x1|0x2) | |
qt.qpa.input: Found matching devices ("/dev/input/event3", "/dev/input/event2") | |
qt.qpa.input: Adding mouse at "/dev/input/event3" | |
qt.qpa.input: create mouse handler for "/dev/input/event3" "" | |
qt.qpa.input: Adding mouse at "/dev/input/event2" | |
qt.qpa.input: create mouse handler for "/dev/input/event2" "" | |
qt.qpa.input: Initializing tslib plugin "TsLib" "" | |
qt.qpa.input: tslib device is "/dev/input/event2" |
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 <Adafruit_NeoPixel.h> | |
#include <lib_dmx.h> // deskontrol library | |
#define DMX512 0 | |
#define PIN 12 // Arduino data pin for the WS2812s | |
#define DELAY 10 // Millis to sleep each loop | |
#define CLUSTER_SIZE 12 // Size of each LED ring | |
#define CLUSTERS_COUNT 30 // Number of LED rings | |
#define DMX_GROUPS 12 // Number of RGB inputs received via DMX... will interpolate these values into the clusters | |
// DMX_CHANNELS = DMX_GROUPS * 3(for RGB) + 1 effect channel |
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 | |
# | |
# This script generates RESTful scaffolds from your pre-existing models. | |
# Copyright 2008 Kyle Maxwell, available under the MIT licence. | |
# | |
require "rubygems" | |
require "active_support" | |
content = File.read(File.dirname(__FILE__) + "/db/schema.rb").split("create_table") |
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
:$ ./script/generate scaffold user | |
The name 'User' is either already used in your application or reserved by Ruby on Rails. | |
Please choose an alternative and run this generator again. | |
Suggestions: | |
exploiter | |
drug user | |
substance abuser | |
:$ |
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
# Encapsulates the pattern where you want your menus to | |
# reflect what page you are on. | |
# | |
module ApplicationHelper | |
def nav_to(name, opts = {}, html = {}) | |
if url_for(opts.merge(:only_path => true)) == request.request_uri | |
tag("a", {:class => "current"}.merge(html), open = true) + name + "</a>" | |
else | |
link_to(name, opts, html) | |
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
# Put in initializers | |
# | |
# Usage: | |
# class Foo < ActiveRecord::Base | |
# finds_by :bar | |
# end | |
# | |
# foo = Foo.create(:bar => "omg") | |
# found = Foo.find "omg" | |
# assert_equal foo.id, found.id |
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
# Allows usage of the following syntax: | |
# Model.find :conditions => {:field => NotNull} | |
class NotNullClass | |
def map(*a, &b) | |
[].map(*a, &b) | |
end | |
def empty? | |
true |
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
<a href="hi">hi</a> |
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 | |
require "rubygems" | |
require "dexterous" | |
require "pp" | |
file = ARGV.shift | |
unless file | |
puts "Usage: #{$0} FILE ID [ID2, ...]" | |
exit 1 |
OlderNewer