- Implement delete selected (@dariocravero).
- Fix issue with delete popover's positioning on FF (@dariocravero).
- Put the footer always to the bottom of the page (@waydotnet).
- Upgrade to bootstrap's v3 (@waydotnet).
- Implement I18n.
- ...?
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
# coding: utf-8 | |
from weasyprint import HTML, CSS | |
def get_page_body(boxes): | |
for box in boxes: | |
if box.element_tag == 'body': | |
return box |
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
authorization do | |
role :guest do | |
has_permission_on :users, :to => :create | |
end | |
role :user do | |
includes :guest | |
has_permission_on :users, :to => :manage do | |
if_attribute :id => is {user.id} | |
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
<IfModule mod_fastcgi.c> | |
AddHandler fastcgi-script .fcgi | |
</IfModule> | |
<IfModule mod_fcgid.c> | |
AddHandler fcgid-script .fcgi | |
</IfModule> | |
Options +FollowSymLinks +ExecCGI | |
RewriteEngine On |
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
#init | |
require 'rubygems' | |
require 'twitter' | |
require 'sinatra' | |
require 'haml' | |
# Twitter auth | |
Twitter.configure do |config| | |
config.consumer_key = 'xxxxxx' | |
config.consumer_secret = 'xxxxxx' |
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
html, body, .container, .content { | |
height: 100%; | |
} | |
.container, .content { | |
position: relative; | |
} | |
.proper-content { | |
padding-top: 40px; /* >= navbar height */ |
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
// jQuery.naturalWidth / jQuery.naturalHeight plugin for (already-loaded) images | |
// Triple-licensed: Public Domain, MIT and WTFPL license - share and enjoy! | |
(function($) { | |
function img(url) { | |
var i = new Image; | |
i.src = url; | |
return i; | |
} |
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
class ImageUploader < CarrierWave::Uploader::Base | |
include CarrierWave::MiniMagick | |
storage :file | |
def thumb(size) | |
begun_at = Time.now | |
size.gsub!(/#/, '!') | |
uploader = Class.new(self.class) | |
uploader.versions.clear | |
uploader.version_names = [size] |
- Smarter completion. A few examples:
- context sensitive -- if you have file "name1" and directory "name2", "cd nam<TAB>" completes to "name2/"
- "tar xf <TAB>" completes to tarballs only. "unrar x <TAB>" completes to RARs only. etc.
- rsync / scp completion: "rsync host:anything/<TAB>" shows you files on host under anything/
- also works with rsync:// URLs
- SSH host completion from ~/.ssh/config & ~/.ssh/known_hosts
- lots of other smart completions: Rake tasks, git commands & SHAs, dpkg packages, dash-options for most commands, etc etc.