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
| <!--Valid flash version 8.0--> | |
| <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="your width" height="your height" id="your id" accesskey="your accesskey" tabindex="your tabindex" title="your title"> | |
| <param name="movie" value="http://yourserver.com/proxy.php?url=http%3A//someserver.com/swf.swf&amp;amp;amp;amp;amp;amp;amp;amp;amp;mimeType=application/x-shockwave-flash" /> | |
| <param name="quality" value="your value" /> | |
| <param name="wmode" value="your value" /> | |
| <param name="swfversion" value="6.0.65.0" /> | |
| <!-- This param tag prompts users with Flash Player 6.0 r65 and higher to download the latest version of Flash Player. Delete it if you don’t want users to see the prompt. --> | |
| <param name="expressinstall" value="/Scripts/expressInstall.swf" /> | |
| <param name="SCALE" value="your value" /> | |
| <param name="allowScriptAccess" value="your value" /> |
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 PostsController extends AppController { | |
| var $name = 'Posts'; | |
| function random() { | |
| $random = $this->Post->find('first',array( | |
| 'conditions' => array( | |
| 'Post.active'=>1, | |
| ), | |
| 'order' => 'rand()', | |
| )); |
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
| set -g prefix C-x | |
| bind-key C-x last-window | |
| # Set status bar | |
| set -g status-bg black | |
| set -g status-fg white | |
| set -g status-left '#[fg=green]#H' | |
| set-window-option -g window-status-current-bg red | |
| set -g status-right '#[fg=yellow]#(uptime | cut -d "," -f 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
| require 'sinatra' | |
| set :environment, :production | |
| disable :run | |
| require File.join(File.dirname(__FILE__), 'app_name') | |
| run Sinatra::Application |
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
| set :domain, "app_name.com" | |
| set :application, "app_name" | |
| set :deploy_to, "/var/www/apps/#{application}" | |
| set :user, "deploy_user" | |
| set :use_sudo, false | |
| set :scm, :git | |
| set :repository, "git@github.com:app_user/app_name.git" | |
| set :branch, 'master' |
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
| app/models/ | |
| ├── user | |
| │ ├── activation.rb | |
| │ ├── authentication.rb | |
| │ ├── avatar.rb | |
| │ ├── recent_projects.rb | |
| │ ├── roles.rb | |
| │ ├── rss.rb | |
| │ ├── scopes.rb | |
| │ └── validation.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
| # app/models/user/ | |
| class User | |
| include Authentication | |
| include Authentication::ByPassword | |
| include Authentication::ByCookieToken | |
| def self.authenticate(login, password) | |
| unless login.blank? or password.blank? |
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 = Account.new | |
| >> y a.methods.grep(/user/).sort | |
| --- | |
| - autosave_associated_records_for_users | |
| - user_ids | |
| - user_ids= | |
| - users | |
| - users= | |
| ... |
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
| create_table :articles_tags, :id => false do |t| | |
| t.references :article, :tag | |
| 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
| module RestControllerMethods | |
| def self.included(base) | |
| base.send :before_filter, :build_obj, :only => [ :new, :create ] | |
| base.send :before_filter, :load_obj, :only => [ :show, :edit, :update, :destroy ] | |
| end | |
| def index | |
| self.instance_variable_set('@' + self.controller_name, | |
| scoper.find(:all)) | |
| end |