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
| Warning: copy(/www/htdocs/w00fd404/wordpress/wp-content/themes/piratenkleider/embed_template.php) [function.copy]: failed to open stream: Permission denied in /www/htdocs/w00fd404/wordpress/wp-content/plugins/vanilla-forums/embed.php on line 74 | |
| Warning: Cannot modify header information - headers already sent by (output started at /www/htdocs/w00fd404/wordpress/wp-content/plugins/vanilla-forums/embed.php:74) in /www/htdocs/w00fd404/wordpress/wp-includes/pluggable.php on line 881 |
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
| 1.9.2p290 :011 > url = "http://mentalized.net/journal/2011/04/14/ruby_how_to_check_if_a_string_is_numeric/" | |
| => "http://mentalized.net/journal/2011/04/14/ruby_how_to_check_if_a_string_is_numeric/" | |
| 1.9.2p290 :012 > url[0..-1] | |
| => "http://mentalized.net/journal/2011/04/14/ruby_how_to_check_if_a_string_is_numeric/" | |
| 1.9.2p290 :013 > url[0..-2] | |
| => "http://mentalized.net/journal/2011/04/14/ruby_how_to_check_if_a_string_is_numeric" |
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 Upload < ActiveRecord::Base | |
| attr_accessible :upload | |
| has_attached_file :upload, :processors => [:watermark] | |
| before_save :test | |
| #https://gist.github.com/784445 | |
| include Rails.application.routes.url_helpers | |
| def test |
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
| module Paperclip | |
| class Watermark < Processor | |
| def initialize(file, options = {}, attachment = nil) | |
| super | |
| STDERR.puts "################################# INITIALIZE ##############################" | |
| @watermark_path = options[:watermark_path] | |
| @position = options[:position].nil? ? "SouthEast" : options[:position] | |
| end | |
| def make |
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
| ActiveRecord::Base.establish_connection( | |
| { :adapter => 'mysql2', | |
| :database => 'some_database', | |
| :host => 'localhost', | |
| :username => 'root', | |
| :password => "" } | |
| ) |
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
| routes: | |
| resources :images do | |
| collection do | |
| post "get_image" | |
| end | |
| member { get :custom_show } | |
| end | |
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
| <div id="1" class="1"> | |
| SOME TEXT 1 | |
| <div id="2">SOME TEXT 2 </div> | |
| </div> |
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
| <div id="example"> | |
| <a href="http://example.com">Title</a> | |
| </div> |
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
| <a href="URL">TEXT</a> |
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
| namespace :daemon do | |
| desc "Start, stop and restart daemon" | |
| task :restart do | |
| run("/etc/init.d/daemon-#{STAGE} restart") | |
| end | |
| end |