I hereby claim:
- I am pjambet on github.
- I am pierrej (https://keybase.io/pierrej) on keybase.
- I have a public key whose fingerprint is A7A2 1A00 1B8E BF41 1E54 7574 8DEF 6131 386B D257
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
# Create new comment | |
Comment.create( :author => "sacha", :message => "toto", :recipe => r) | |
# Ya plus simple | |
r.comments.create author: 'sacha', message: 'toto' | |
# Normalement ca devrait pas poser de problemes de mass assignment ca | |
def get_name_for_user user | |
user | |
end |
let g:gist_post_private = 1 |
# user_id is an integer, follow is a hash wich values are all integers | |
# PHP | |
$userIds = array_unique(array_merge(array_values($follows), array($userId))); | |
# ruby | |
userIds = follows.keys.push(user_id).uniq | |
# python | |
userIds = set(follows.keys().append(user_id)) |
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
""" | |
fabfile for Django | |
------------------ | |
see http://morethanseven.net/2009/07/27/fabric-django-git-apache-mod_wsgi-virtualenv-and-p/ | |
modified for fabric 0.9/1.0 by Hraban (fiëé visuëlle) | |
several additions, corrections and customizations, too |
module WillPaginate | |
module ActionView | |
def will_paginate(collection = nil, options = {}) | |
options[:renderer] ||= FoundationLinkRenderer | |
super.try :html_safe | |
end | |
class FoundationLinkRenderer < LinkRenderer | |
protected |
export CPPFLAGS="-I/usr/local/opt/openssl/include -I/usr/local/opt/readline/include" | |
export LDFLAGS="-L/usr/local/opt/openssl/lib -L/usr/local/opt/readline/lib -Wl,-dead_strip_dylibs" | |
POSTGRES_EXTRA_CONFIGURE_OPTIONS="--with-uuid=e2fs --with-bonjour --with-openssl -v" asdf install postgres 9.6.10 |
<p class="subtitle">Learn how one of the web’s biggest accidental success stories evolved.</p></header></div></div><div class="site-inner"><div class="content-sidebar-wrap"><main class="content"><article class="post-9674 page type-page status-publish entry"><div class="saboxplugin-wrap"><div class="saboxplugin-gravatar"><picture width="100" height="100" alt="Claire Broadley" class="avatar avatar-100 wp-user-avatar wp-user-avatar-100 alignnone photo sp-no-webp"><source srcset="https://digital.com/wp-content/uploads/AAEAAQAAAAAAAAkMAAAAJDIwMTM5ZDdiLTQwNTMtNDMxZS1iOGJlLWZlOGI1NzlhYzFlNg-150x150.webp" type="image/webp"><source srcset="https://digital.com/wp-content/uploads/AAEAAQAAAAAAAAkMAAAAJDIwMTM5ZDdiLTQwNTMtNDMxZS1iOGJlLWZlOGI1NzlhYzFlNg-150x150.jpg"><img src="https://digital.com/wp-content/uploads/AAEAAQAAAAAAAAkMAAAAJDIwMTM5ZDdiLTQwNTMtNDMxZS1iOGJlLWZlOGI1NzlhYzFlNg-150x150.jpg" width="100" height="100" alt="Claire Broadley" class="avatar avatar-100 wp-user-avatar wp-user-avatar-100 alignnone photo s |
try { | |
// Use Stripe's library to make requests... | |
} catch (CardException e) { | |
// Since it's a decline, CardException will be caught | |
System.out.println("Status is: " + e.getCode()); | |
System.out.println("Message is: " + e.getMessage()); | |
} catch (RateLimitException e) { | |
// Too many requests made to the API too quickly | |
} catch (InvalidRequestException e) { | |
// Invalid parameters were supplied to Stripe's API |