This file contains hidden or 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
def update_cakemail(user,nom,prenom,email,listid,postalcode) | |
#Find the user in the list to see if he already exist | |
findPars = CakeLibrary::CakeHash.new() | |
findPars['client_id'] = CLIENT_ID | |
findPars["user_key"] = user["user_key"].to_s | |
findPars["list_id"] = listid | |
findPars["limit"] = 1 | |
findPars["offset"] = 0 | |
findPars["query"] = '`email` LIKE "%' + email + '"' | |
res = CakeLibrary::CakeList.Search(findPars) |
This file contains hidden or 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
window._lang = 'fr'; | |
var translations = { | |
'String to Translate': 'Chaîne à traduire', | |
'something': 'quelque chose' | |
}; | |
var __ = function(msgid) { | |
if (window._lang === 'fr' && (msgid in translations)) { | |
return translations[msgid]; |
This file contains hidden or 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
<?php | |
function get_icon_for_attachment($post_id) { | |
$base = get_template_directory_uri() . "/images/icons/"; | |
$type = get_post_mime_type($post_id); | |
switch ($type) { | |
case 'image/jpeg': | |
case 'image/png': | |
case 'image/gif': | |
return $base . "image.png"; break; |
This file contains hidden or 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
if [ -f ~/.bashrc ]; then | |
source ~/.bashrc | |
fi | |
export DROPBOXDIR="/Users/jdesrosiers/Dropbox" | |
# add bicycle's cli in the path | |
export PATH="$PATH:/Applications/XAMPP/htdocs/lib/bicycle/bin:$HOME/.local/bin" |
This file contains hidden or 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 Review < ActiveRecord::Base | |
# ... some other code here ... | |
def self.form_fields | |
[ | |
{:name=>:journalist_name,:type=>:text_field}, | |
{:name=>:publication,:type=>:text_field}, | |
{:name=>:city,:type=>:text_field}, | |
{:name=>:title_en,:type=>:text_field}, |
This file contains hidden or 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 Padrino::Helpers::FormBuilder::JoiedminFormBuilder < Padrino::Helpers::FormBuilder::AbstractFormBuilder | |
# Here we have access to a number of useful variables | |
# | |
# ** template (use this to invoke any helpers)(ex. template.hidden_field_tag(...)) | |
# ** object (the record for this form) (ex. object.valid?) | |
# ** object_name (object's underscored type) (ex. object_name => 'admin_user') | |
# | |
# We also have access to self.field_types => [:text_field, :text_area, ...] | |
# In addition, we have access to all the existing field tag | |
# helpers (text_field, hidden_field, file_field, ...) |
This file contains hidden or 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
-# new.haml: | |
- form_for @acclaim, '/admin/acclaims/new', :multipart=>true, :method=>'post' do |f| | |
= f.error_messages | |
= f.crud_fields | |
%p.buttons | |
= f.submit "Create",:class=>'wymupdate' | |
= link_to 'Back', '/admin/acclaims' | |
This file contains hidden or 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
/* | |
* @example An iframe-based dialog with custom button handling logics. | |
*/ | |
( function() { | |
CKEDITOR.plugins.add( 'MediaEmbed', | |
{ | |
requires: [ 'iframedialog' ], | |
init: function( editor ) | |
{ | |
var me = this; |
This file contains hidden or 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
macbook-pro-de-julien-desrosiers:rock juliend2$ make rescue | |
git pull | |
Already up-to-date. | |
rm -rf build/ | |
wget http://commondatastorage.googleapis.com/rock-linux/rock-bootstrap-only.tar.bz2 -O - | tar xjvmp | |
--2011-03-10 16:47:48-- http://commondatastorage.googleapis.com/rock-linux/rock-bootstrap-only.tar.bz2 | |
Resolving commondatastorage.googleapis.com... 209.85.225.132 | |
Connecting to commondatastorage.googleapis.com|209.85.225.132|:80... connected. | |
HTTP request sent, awaiting response... 200 OK | |
Length: 46 [application/x-bz2] |
This file contains hidden or 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
macbook-pro-de-julien-desrosiers:mycarrierwave juliend2$ rake spec --trace | |
(in /Users/juliend2/Code/Ruby/mycarrierwave) | |
** Invoke spec (first_time) | |
** Execute spec | |
/Users/juliend2/.ruby_inline/Inline_ImageScience_cdab.c:2:23: error: FreeImage.h: No such file or directory | |
/Users/juliend2/.ruby_inline/Inline_ImageScience_cdab.c: In function ‘unload’: | |
/Users/juliend2/.ruby_inline/Inline_ImageScience_cdab.c:8: error: ‘FIBITMAP’ undeclared (first use in this function) | |
/Users/juliend2/.ruby_inline/Inline_ImageScience_cdab.c:8: error: (Each undeclared identifier is reported only once | |
/Users/juliend2/.ruby_inline/Inline_ImageScience_cdab.c:8: error: for each function it appears in.) | |
/Users/juliend2/.ruby_inline/Inline_ImageScience_cdab.c:8: error: ‘bitmap’ undeclared (first use in this function) |