Skip to content

Instantly share code, notes, and snippets.

View rainerborene's full-sized avatar

Rainer Borene rainerborene

View GitHub Profile
/*
---
script: LightboxMe.js
description: Transforms an element into a light box. Based on Buck Wilson's plugin.
author: Rainer Borene
license: MIT-license
<?php
// This is a basic function skeleton for
// customizing events with validation logic.
protected function __trigger() {
$validation = new Validation(self::ROOTELEMENT);
$rules = array(
'name' => 'required',
'email' => 'required|valid_email',
@rainerborene
rainerborene / ViewBackground.m
Created December 27, 2010 17:25
Custom Toolbar Background
#import "ViewBackground.h"
@implementation ViewBackground
- (id)initWithFrame:(NSRect)frame {
self = [super initWithFrame:frame];
if (self) {
// Initialization code here.
}
return self;
@rainerborene
rainerborene / symphony_templates.markdown
Created March 6, 2011 16:57
Rediscovering Symphony templates

Rediscovering Symphony templates

In Symphony 2.2.1 you get the dark side of the force to customize some particular views, like Exceptions and Fatal Error templates.

We're going to learn what each template do, and how we can customize them. All described files here are located in the symphony/template directory.

datasource.tpl represents Data Sources created in the back-end. There is not much you can do but you can get rid of some useless data in the about() function like website.

event.tpl same as Data Sources, but for events.

@rainerborene
rainerborene / gconf.xml
Created June 1, 2011 20:46
My gnome terminal profile
<?xml version="1.0"?>
<gconf>
<entry name="backspace_binding" mtime="1305751668" type="string">
<stringvalue>ascii-del</stringvalue>
</entry>
<entry name="delete_binding" mtime="1305751668" type="string">
<stringvalue>escape-sequence</stringvalue>
</entry>
<entry name="scroll_on_output" mtime="1305751658" type="bool" value="false"/>
<entry name="use_theme_background" mtime="1306933077" type="bool" value="false"/>
@rainerborene
rainerborene / _header.scss.diff
Created June 17, 2011 13:11
ActiveAdmin Dropdown CSS fix
--- /tmp/_header.scss 2011-06-17 10:10:31.941721324 -0300
+++ _header.scss 2011-06-17 10:17:50.001721374 -0300
@@ -6,22 +6,23 @@
padding: 9px $horizontal-page-margin;
position: relative;
z-index: 900;
+ height:17px;
h1 {
- display: inline;
# encoding: utf-8
class Depot
attr_accessor :entries
def self.construct(&block)
new.tap do |depot|
depot.entries = {}
depot.instance_eval(&block)
end
@rainerborene
rainerborene / es.sh
Created May 3, 2012 01:53 — forked from aaronshaf/es.sh
Install ElasticSearch on Ubuntu 11.04
cd ~
sudo apt-get update
sudo apt-get install unzip curl python-software-properties -y
#sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"
sudo add-apt-repository ppa:ferramroberto/java
sudo apt-get update
sudo apt-get install sun-java6-jre sun-java6-plugin -y
wget https://github.com/downloads/elasticsearch/elasticsearch/elasticsearch-0.19.3.tar.gz -O elasticsearch.tar.gz
tar -xf elasticsearch.tar.gz
|| fish: Unknown command 'EXIT'
|| /usr/local/share/fish/functions/trap.fish (line 24): begin; set opt -- lph -- rm -f /var/folders/nl/_p1mkgz513gb7fs4m7r9qgq40000gn/T/vX51L0s/41.pid; touch /var/folders/nl/_p1mkgz513gb7fs4m7r9qgq40000gn/T/vX51L0s/41.complete; EXIT INT TERM ;end
|| ^
|| in . (source) call of file '-',
|| called on line 44 of file '/usr/local/share/fish/functions/trap.fish',
||
|| in function 'trap',
|| called on standard input,
|| with parameter list 'rm -f /var/folders/nl/_p1mkgz513gb7fs4m7r9qgq40000gn/T/vX51L0s/41.pid; touch /var/folders/nl/_p1mkgz513gb7fs4m7r9qgq40000gn/T/vX51L0s/41.complete; EXIT INT TERM'
||
" Start a process in a new, focused split pane.
function! s:StartSplit()
let directory = expand('%:p:h')
let command = exists('b:start') ? b:start : &shell
exec printf('Tmux splitw -c %s %s', directory, command)
endfunction
command! -nargs=0 StartSplit call s:StartSplit()
" Dispatch
nnoremap <leader>r :StartSplit<CR>