I hereby claim:
- I am guich-wo on github.
- I am guillaumedufloux (https://keybase.io/guillaumedufloux) on keybase.
- I have a public key whose fingerprint is 44FC A011 1A90 E385 3F44 10F1 FF88 6686 C790 6626
To claim this, I am signing this object:
# Applescript to highlight ruby code in Pages | |
# Requirements : Pygments (http://pygments.org/languages/) : pip install Pygments | |
# Tutorial: https://shomeya.com/articles/screencast-how-to-add-syntax-highlighting-to-pages-and-keynote | |
try | |
set old to the clipboard as record | |
end try | |
tell application "System Events" to keystroke "c" using command down | |
do shell script "export LC_CTYPE=UTF-8; pbpaste | /usr/local/bin/pygmentize -l ruby -f rtf -O style=default | pbcopy -Prefer rtf" | |
tell application "System Events" to keystroke "v" using command down | |
delay 0.05 |
module Abilities | |
def self.ability_for(user) | |
AdminAbility.new(user) if user.admin? | |
MemberAbility.new(user) if user.member? | |
# etc... | |
end | |
class AdminAbility | |
include CanCan::Ability |
I hereby claim:
To claim this, I am signing this object: