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
| <ul> | |
| <% @orders.each do |order| %> | |
| <li> | |
| <!-- Show order stuff --> | |
| </li> | |
| <% end %> | |
| </ul> | |
| <%= will_paginate @orders %> |
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
| rails_root = ENV['RAILS_ROOT'] || File.dirname(__FILE__) + '/../..' | |
| rails_env = ENV['RAILS_ENV'] || 'development' | |
| resque_config = YAML.load_file(rails_root + '/config/resque.yml') | |
| Resque.redis = resque_config[rails_env] | |
| #secure the admin view of resque | |
| Resque::Server.use(Rack::Auth::Basic) do |user, password| | |
| password == "secret" | |
| 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
| class DownloadsController < ApplicationController | |
| DOWNLOAD_EXPIRY = 30.minutes | |
| DOWNLOAD_SECRET = "MYSECRET" | |
| def show | |
| download = Download.find(params[:id]) | |
| # download.file_path - get the path to the file, relative to the downloads directory | |
| serve_file(download.file_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
| curl https://raw.github.com/gist/1588091/8b7b7a203074231f3dc75bdee48b3017078fb621/CentOS-Base.repo -o /etc/yum.repos.d/CentOS-Base.repo | |
| curl https://raw.github.com/gist/1588091/2e5ab750cd0603dd7210ea7a999d15f9aadae711/epel.repo -o /etc/yum.repos.d/epel.repo |
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
| # ElasticSearch Service | |
| description "ElasticSearch" | |
| start on (net-device-up | |
| and local-filesystems | |
| and runlevel [2345]) | |
| stop on runlevel [016] |
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
| upstream example_backend { | |
| server unix:/var/www/example.com/shared/unicorn.sock; | |
| } | |
| server { | |
| listen 80; | |
| server_name example.com www.example.com; | |
| access_log off; | |
| error_log off; | |
| client_max_body_size 20M; |
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 CarrierWave | |
| module FFMPEG | |
| extend ActiveSupport::Concern | |
| module ClassMethods | |
| def faststart | |
| process :faststart => true | |
| end | |
| def transcode options |
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
| #!/usr/bin/env sh | |
| ## | |
| # This is script with usefull tips taken from: | |
| # https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
| # | |
| # install it: | |
| # curl -sL https://raw.github.com/gist/2108403/hack.sh | sh | |
| # |
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
| <?xml version="1.0" encoding="UTF-8"?> | |
| <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" | |
| "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
| <plist version="1.0"> | |
| <dict> | |
| <key>Label</key> | |
| <string>org.redis.redis-server</string> | |
| <key>Program</key> | |
| <string>/usr/local/redis/bin/redis-server</string> | |
| <key>ProgramArguments</key> |
OlderNewer