Skip to content

Instantly share code, notes, and snippets.

View dennisreimann's full-sized avatar
still hungry. still foolish.

d11n dennisreimann

still hungry. still foolish.
View GitHub Profile
@dennisreimann
dennisreimann / coffeelint.json
Created October 16, 2014 05:12
gulp setup for building node-webkit apps
{
"coffeescript_error": {
"level": "error"
},
"arrow_spacing": {
"name": "arrow_spacing",
"level": "ignore"
},
"no_tabs": {
"name": "no_tabs",
# Rails template for initializing new projects
# Initialize git repository
git :init
# Delete unnecessary files
run "rm README"
run "rm public/index.html"
run "rm public/favicon.ico"
run "rm public/robots.txt"
set :user, "dbloete"
set :domain, "the.domain.com"
set :application, "myapp"
set :deploy_to, "/var/www/#{application}"
set :repository, "git@github.com:#{user}/#{application}.git"
namespace :vlad do
desc "Symlinks the configuration files"
remote_task :symlink_config, :roles => :web do
%w(application.yml database.yml).each do |file|
require 'net/http'
require 'uri'
# /api/v1/:format/new
# /api/v1/:format/gists/:user
# /api/v1/:format/:gist_id
res = Net::HTTP.post_form(URI.parse('http://gist.github.com/api/v1/xml/new'),
{ 'files[file1.ab]' => 'CONTNETS',
'files[file2.ab]' => 'contents' })
#!/bin/bash
# This script will update your cappuccino installation with the
# current version of the provided branch (defaults to "master")
cd /usr/local/src/cappuccino/
branch=${1-"master"}
# update sources
git checkout -f -b $branch origin/$branch
git pull
@dennisreimann
dennisreimann / galen-foreach-example.gspec
Created September 3, 2015 13:36
Galen forEach example with nested objects
@objects
form-row-* .form__row
label .form__row__label
input .form__row__input
= Form =
@on small
@forEach [form-row-*] as row
${row}.label:
# poor mans debugger
#
# if you want to know whats the value of an object just add .why?
# and you will see what it is and why your program behaves like it does.
#
Object.class_eval {def why?; raise "Because it is #{inspect}" ; end}
html, body, div, form, fieldset, legend, label {
margin: 0;
padding: 0;
}
table {
border-collapse: collapse;
border-spacing: 0;
}
From 22f184268e27474faf93b2d06893f42593b084e1 Mon Sep 17 00:00:00 2001
From: dbloete <mail@dennisbloete.de>
Date: Tue, 25 May 2010 22:07:35 +0200
Subject: [PATCH] Fix compass/sass deprecation warnings
---
Rakefile | 2 +-
stylesheets/_base.sass | 2 +-
stylesheets/_layout.sass | 2 +-
stylesheets/_library.sass | 12 +++---
module AuthenticationHelpers
def current_user_session
return @current_user_session if defined?(@current_user_session)
@current_user_session = UserSession.find
end
def current_user
return @current_user if defined?(@current_user)
@current_user = current_user_session && current_user_session.user