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
// Binding to URL | |
HonVotes = new Recource({ url: 'http://domain.com/prefix/hon/votes' }); | |
// Default jQuery callbacks | |
Comments = new Resource({ | |
url: 'http://domain.com/prefix/comments' | |
//dataType: 'json', | |
beforeSend: function(){}, |
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/sh | |
# install scrot pwgen xsel | |
# your dropbox account number goes here | |
DROPBOX=1788721 | |
FILENAME=$HOME'/Dropbox/Public/screenshots/%Y%m%d-%H%M%S-screenshot-'`pwgen -1`'.png' | |
scrot -s $FILENAME -e 'curl "http://is.gd/api.php?longurl=http://dl.dropbox.com/u/'$DROPBOX'/screenshots/"$n' 2>/dev/null | xsel -i -b |
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
#http://ubuntuforums.org/showthread.php?t=786095 | |
sudo aptitude install build-essential subversion git-core checkinstall yasm texi2html libfaac-dev libfaad-dev libmp3lame-dev libopencore-amrnb-dev libopencore-amrwb-dev libsdl1.2-dev libx11-dev libxfixes-dev libxvidcore4-dev zlib1g-dev | |
cd ~/tmp | |
git clone git://git.videolan.org/x264.git | |
cd x264 | |
./configure | |
make -j2 |
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
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; |
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
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 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
-- 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 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
#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 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
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 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
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 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
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 |