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 (isset($weather_data[$column]) && $weather_data[$column] && isset($mapping[$weather_data[$column]]) && $mapping[$weather_data[$column]]) { | |
if (isset($field['weatherfield_settings']['cs'][$column]['s'][$mid]['g']['options_files'][$mapping[$weather_data[$column]]]) && isset($field['weatherfield_settings']['cs'][$column]['s'][$mid]['g']['options_files'][$mapping[$weather_data[$column]]]['fid'])) { | |
if (isset($files[$field['field_name']][$field['weatherfield_settings']['cs'][$column]['s'][$mid]['g']['options_files'][$mapping[$weather_data[$column]]]['fid']])) { | |
$column_output = theme('image', $files[$field['field_name']][$field['weatherfield_settings']['cs'][$column]['s'][$mid]['g']['options_files'][$mapping[$weather_data[$column]]]['fid']]->filepath); | |
} | |
} | |
} |
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 | |
/** | |
* Usage | |
* $inconsistent_view_thingy = views_get_view("some_view_name"); | |
* $more_inconsistent_view_thingy = rand_obj_or_array($inconsistent_view_thingy); | |
*/ | |
function rand_obj_or_array($thing) { | |
$det = rand(0,2); |
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 | |
/* | |
Plugin Name: WP-TweetButton | |
Version: 1.7.5 | |
Description: Automatically adds the new Official Twitter Tweet Button to your Blog.Easily Customizable from the Dashboard(with Tweet Syntax, hash tags and much more.). | |
Author: CoderPlus | |
Author URI: http://coderplus.com | |
Plugin URI: http://coderplus.com/2010/08/twitter-tweet-button-plugin-for-wordpress/ | |
wp-tweetbutton | |
*/ |
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
require 'RMagick' | |
class CropToelie | |
include Magick | |
attr_accessor :image | |
attr_accessor :width | |
attr_accessor :height | |
attr_accessor :step_size | |
def initialize image_path |
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 Services::Twitter < Service | |
MAX_CHARACTERS = 140 | |
def post(post, url='') | |
Rails.logger.debug("event=post_to_service type=twitter sender_id=#{self.user_id}") | |
message = public_message(post, url) | |
twitter_key = SERVICES['twitter']['consumer_key'] | |
twitter_consumer_secret = SERVICES['twitter']['consumer_secret'] |
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
# Copyright (c) 2010, Diaspora Inc. This file is | |
# licensed under the Affero General Public License version 3 or later. See | |
# the COPYRIGHT file. | |
class Service | |
include MongoMapper::Document | |
include ActionView::Helpers::TextHelper | |
belongs_to :user |
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
diff --git a/app/models/service.rb b/app/models/service.rb | |
index eb0d48a..e0234b0 100644 | |
--- a/app/models/service.rb | |
+++ b/app/models/service.rb | |
@@ -26,3 +26,4 @@ class Service | |
end | |
require File.join(Rails.root, 'app/models/services/facebook') | |
require File.join(Rails.root, 'app/models/services/twitter') | |
+require File.join(Rails.root, 'app/models/services/identica') | |
diff --git a/app/models/services/identica.rb b/app/models/services/identica.rb |
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
/home/ber/.rvm/gems/ruby-1.9.2-p0@rails_sample_app/gems/activesupport-3.0.1/lib/active_support/dependencies.rb:239:in `require': /home/ber/Documenten/WBR_webschuurrails/sample_app/spec/factories.rb:3: invalid multibyte char (US-ASCII) (SyntaxError) | |
/home/ber/Documenten/WBR_webschuurrails/sample_app/spec/factories.rb:3: invalid multibyte char (US-ASCII) | |
/home/ber/Documenten/WBR_webschuurrails/sample_app/spec/factories.rb:3: syntax error, unexpected $end, expecting keyword_end | |
user.name "Bèr Kessels" | |
^ | |
from /home/ber/.rvm/gems/ruby-1.9.2-p0@rails_sample_app/gems/activesupport-3.0.1/lib/active_support/dependencies.rb:239:in `block in require' | |
from /home/ber/.rvm/gems/ruby-1.9.2-p0@rails_sample_app/gems/activesupport-3.0.1/lib/active_support/dependencies.rb:225:in `block in load_dependency' | |
from /home/ber/.rvm/gems/ruby-1.9.2-p0@rails_sample_app/gems/activesupport-3.0.1/lib/active_support/dependencies.rb:591:in `new_constants_in' | |
from /home/ber/.rvm/gems/r |
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
#! /bin/bash | |
# create archive directories: | |
archiveroot="$HOME/Archief/mail/" | |
dir="$archiveroot`date +%Y`/`date +%m`/`date +%d`/" | |
mkdir -p $dir | |
# set passwordfile, file should contain nothing but the password. | |
# You should at least make this file only readable by you. | |
pwfile=$HOME/Private/archivemailpw |
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
# Copyright (c) 2010, Diaspora Inc. This file is | |
# licensed under the Affero General Public License version 3 or later. See | |
# the COPYRIGHT file. | |
nl: | |
errors: | |
messages: | |
not_found: "niet gevonden" | |
already_confirmed: "is al geactiveerd" | |
not_locked: "is niet geblokkeerd" |