This file contains 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/ruby | |
rate = 1000.0 | |
tax = 130.0 | |
real = cost - tax | |
tasks = [ | |
[8, "Установка и адаптация гравицапы" ], | |
[1, "Установка цапфы"], |
This file contains 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
server { | |
listen 80; | |
server_name *.domain.com; | |
root /www/domain.com; | |
access_log /var/log/nginx/domain.com.access.log urchin; | |
location ~* ^/.+(\.gif|\.png|\.jpg|\.css|\.js|\.swf|\.ico)$ { | |
expires 2d; |
This file contains 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/sh | |
./configure \ | |
--add-module=/var/lib/gems/1.8/gems/passenger-2.2.5/ext/nginx \ | |
--prefix=/usr \ | |
--sbin-path=/usr/sbin \ | |
--conf-path=/etc/nginx/nginx.conf \ | |
--error-log-path=/var/log/nginx/error.log \ | |
--pid-path=/var/run/nginx.pid \ | |
--lock-path=/var/lock/nginx.lock \ |
This file contains 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
2009/09/26 02:23:51 [error] 12021#0: *102 open() "/var/www/nginx-default/phpMyAdmin/scripts/setup.php" failed (2: No such file or directory), client: 94.102.211.88, server: localhost, request: "GET //phpMyAdmin//scripts/setup.php HTTP/1.1", host: "67.23.22.224" | |
2009/09/26 02:59:08 [error] 12021#0: *105 open() "/var/www/nginx-default/phpmyadmin/scripts/setup.php" failed (2: No such file or directory), client: 94.102.211.88, server: localhost, request: "GET //phpmyadmin//scripts/setup.php HTTP/1.1", host: "67.23.22.224" | |
2009/09/26 03:34:20 [error] 12021#0: *108 open() "/var/www/nginx-default/pma/scripts/setup.php" failed (2: No such file or directory), client: 94.102.211.88, server: localhost, request: "GET //pma//scripts/setup.php HTTP/1.1", host: "67.23.22.224" | |
2009/09/26 04:09:25 [error] 12021#0: *111 open() "/var/www/nginx-default/mysql/scripts/setup.php" failed (2: No such file or directory), client: 94.102.211.88, server: localhost, request: "GET //mysql//scripts/setup.php HTTP/1.1", host: "67.23.22.22 |
This file contains 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
var TouchEditor = Class.create(); | |
TouchEditor.prototype = { | |
initialize : function(element) { | |
this.element = $(element); | |
this.article_id = Element.readAttribute(element, 'article_id'); | |
this.fragments = []; | |
var fragments = $$('.fragment'); | |
fragments.each(this.setup_fragment.bind(this)); |
This file contains 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 create | |
result = @article.content.append_fragment params[:content] | |
@article.save | |
respond_to do |format| | |
format.json do | |
render :json => result | |
end | |
end | |
end |
This file contains 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
#http://guides.rubyonrails.org/plugins.html | |
module Yaffle | |
def self.included(base) | |
base.send :extend, ClassMethods | |
end | |
module ClassMethods | |
def acts_as_yaffle(options = {}) | |
cattr_accessor :yaffle_text_field |
This file contains 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
-- Paths and stuff | |
set ArtworkFromiTunes to ((path to home folder) as text) & ¬ | |
"Pictures:iTunes Artwork:From iTunes:albumArt.pict" as alias | |
set iTunesArtwork to ((path to home folder) as text) & ¬ | |
"Pictures:iTunes Artwork:From iTunes:albumArt.pict" | |
set DefaultArtwork to ((path to home folder) as text) & ¬ | |
"Pictures:iTunes Artwork:Default:albumArt.pict" | |
set displayArtwork to ((path to home folder) as text) & ¬ | |
"Pictures:iTunes Artwork:albumArt.pict" |
This file contains 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
ActionController::Routing::Routes.draw do |map| | |
# Business domain resources | |
map.resources :users do |user| | |
user.resources :reviews, :only => [:index] | |
user.resources :events, :controller => "reviews", :only => [:index] | |
user.resources :follows, :only => [:index, :create, :destroy] | |
user.resources :followers, :only => [:index] |
This file contains 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
server { | |
listen 80; | |
server_name dokuwiki.valery; | |
rewrite_log on; | |
root /www/dokuwiki; | |
location / { | |
if (!-f $request_filename) { | |
rewrite ^_media/(.*) lib/exe/fetch.php?media=$1 last; |