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
" Add this to the end of vimrc | |
if $COLORTERM == 'gnome-terminal' | |
set t_Co=256 | |
endif |
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
<link rel="import" href="../google-map/google-map-directions.html"> | |
<link rel="import" href="../google-map/google-map.html"> | |
<polymer-element name="my-element"> | |
<template> | |
<style> | |
:host { | |
position: absolute; | |
width: 100%; |
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
validateUser = makesure -> | |
@permit "name email" # optional | |
@attrs("name email").isNot('empty').orSay "can't be empty" | |
userInput = | |
name: "" | |
description: "My description" | |
admin: 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
# Generates SQL from migrations | |
# | |
# Usage: | |
# rake db:[migrate,rollback]:with_sql | |
# | |
# The previous rake task will run migrations and create a file in `db/migrate_sql` | |
# Depending on migrate or rollback a file will be created with the respective | |
# sufix. | |
# | |
# Drawbacks: |
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
export TERM="screen-256color" | |
alias tmux="TERM=screen-256color tmux -2" |
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
# Avoid paperclip to process the images in tests. | |
module Paperclip | |
class << self | |
alias_method :old_run, :run | |
def run cmd, params = "", expected_outcodes = 0 | |
case cmd | |
when "identify" | |
return old_run(cmd, params, expected_outcodes) |
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
derby = require 'derby' | |
{get, view, ready} = derby.createApp module | |
derby.use(require '../../ui') | |
FeedParser = require('feedparser') | |
parser = new FeedParser() | |
## ROUTES ## |
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
sudo apt-get install libdjvulibre-dev libjpeg-dev libtiff-dev libwmf-dev libmagickcore-dev libmagickwand-dev libmagick++-dev rvm | |
sudo gem install rmagick | |
ok! | |
Fetching: rmagick-2.13.1.gem (100%) Building native extensions. This could take a while ... Successfully installed rmagick-2.13.1 1 gem installed | |
require 'RMagick' #=> 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
= raw truncate(strip_tags(item.description), :length => 90, :omission => '... ') |
OlderNewer