Skip to content

Instantly share code, notes, and snippets.

View tboerger's full-sized avatar
:shipit:
Getting mad with crazy stuff

Thomas Boerger tboerger

:shipit:
Getting mad with crazy stuff
  • Cloudpunks GmbH
  • Nuremberg, Germany
  • 19:43 (UTC +02:00)
  • X @tboerger
View GitHub Profile
class Setting
include Mongoid::Document
include Mongoid::Timestamps
include Mongoid::History::Trackable
track_history track_create: false,
track_update: true,
track_destroy: true
cattr_accessor :succeeds
[ 22s] RPMLINT report:
[ 22s] ===============
[ 23s] libcppconsui0.x86_64: W: shared-lib-calls-exit /usr/lib64/libcppconsui.so.0.0.0 exit@GLIBC_2.2.5
[ 23s] This library package calls exit() or _exit(), probably in a non-fork()
[ 23s] context. Doing so from a library is strongly discouraged - when a library
[ 23s] function calls exit(), it prevents the calling program from handling the
[ 23s] error, reporting it to the user, closing files properly, and cleaning up any
[ 23s] state that the program has. It is preferred for the library to return an
[ 23s] actual error code and let the calling program decide how to handle the
[ 23s] situation.
Crowbar::Application.routes.draw do
root to: "dashboard#index"
Dir.glob(File.join(File.dirname(__FILE__), "routes.d", "*.routes")) do |routes_file|
eval(IO.read(routes_file), binding)
end
constraints(id: /.*/ ) do
get "dashboard" => "dashboard#index", as: :dashboard

Direction-aware 3D hover effect

After seeing this site http://fitzfitzpatrick.com/ I decided to give a try to the "direction-aware hover effect". My first thought was to do it with a pure CSS, not too late I changed my mind and decided to use JS (I need to sleep anyway).

It's kind of simple, using JS we can easily detect the direction the cursor is coming, then, I am using CSS animations for each case (8 in total).

A Pen by Noel Delgado on CodePen.

License.

@tboerger
tboerger / controller.js
Created April 16, 2014 07:51
Simple Angular/jQuery UI drag & drop directive
angular
.module(
'app.controllers',
[]
)
.controller(
'DashboardCtrl',
[
'$scope',
function($scope) {
ruby
ruby20
ruby-common
rubygem-activerecord-session_store
rubygem-activeresource
rubygem-addressable
rubygem-arel
rubygem-ast
rubygem-bcrypt
rubygem-better_errors
From 77286c33e8767a935af27e0681d1ea02d47c7d4f Mon Sep 17 00:00:00 2001
From: miah <miah@chia-pet.org>
Date: Tue, 14 May 2013 22:34:53 -0700
Subject: [PATCH] Load the libraries directory recursively.
---
lib/chef/cookbook/cookbook_version_loader.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/chef/cookbook/cookbook_version_loader.rb b/lib/chef/cookbook/cookbook_version_loader.rb
#!/usr/bin/env ruby
require "rubygems"
require "pathname"
require "dante"
require "file-monitor"
require "mixlib/shellout"
module Dante
class Runner
module Haml
module Compiler
class << self
def build_attributes_with_dasherize(is_html, attr_wrapper, escape_attrs, attributes = {})
new_attributes = {}.tap do |dasherized|
attributes.keys.each do |key|
dasherized[key.to_s.gsub("_", "-").to_sym] = attributes[key]
end
end
--- !ruby/hash:ActionController::Parameters
attributes: &1 !ruby/hash:ActiveSupport::HashWithIndifferentAccess
crowbar: !ruby/hash:ActiveSupport::HashWithIndifferentAccess
...
id: default
bar: true
action: proposal_create
controller: crowbar
crowbar: !ruby/hash:ActiveSupport::HashWithIndifferentAccess
attributes: *1