Skip to content

Instantly share code, notes, and snippets.

This is the query:
SELECT * FROM questions
LEFT JOIN messages on questions.id = messages.question_id
LEFT JOIN questions_skip_counts qsc on questions.id = qsc.question_id AND questions.user_id = qsc.user_id
WHERE messages.sender_id = NULL and questions.user_id != 'FOO' AND qsc.skip_count =
(SELECT min(qsc.skip_count) FROM questions LEFT
JOIN messages on questions.id = messages.question_id LEFT JOIN questions_skip_counts qsc on questions.id = qsc.question_id AND questions.user_id = qsc.user_id WHERE messages.sender_id = NULL and questions.user_id != 'FOO')
%define rubyver 1.9.3
%define rubyminorver p125
Name: ruby
Version: %{rubyver}%{rubyminorver}
Release: 2%{?dist}
License: Ruby License/GPL - see COPYING
URL: http://www.ruby-lang.org/
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: readline readline-devel ncurses ncurses-devel gdbm gdbm-devel glibc-devel tcl-devel gcc unzip openssl-devel db4-devel byacc make libyaml-devel
1.8.7 :001 > autoload :MyLibrary, 'my_library'
=> nil
1.8.7 :002 > module FooModule
1.8.7 :003?> def foo
1.8.7 :004?> puts 'new foo'
1.8.7 :005?> end
1.8.7 :006?> end
=> nil
1.8.7 :007 > class MyLibrary
1.8.7 :008?> include FooModule
class User < ActiveRecord::Base
attr_accessor :firstname, :lastname, :email
end
diff --git a/app/models/topic.rb b/app/models/topic.rb
index c27a174..bcd9d5a 100644
--- a/app/models/topic.rb
+++ b/app/models/topic.rb
@@ -117,15 +117,55 @@ class Topic < ActiveRecord::Base
replies.active.count
end
+ # Public: Used by views to determine whether the index page needs to
+ # be updated.
class CallListAbility
include CanCan::Ability
def initialize(user)
if user.admin
can :manage, CallList, :account => { :id => user.account.id }
else
can :create, CallList
# call list has one account through a campaign
class CallListAbility
include CanCan::Ability
def initialize(user)
if user.admin
can :manage, CallList, :account => { :id => user.account.id }
else
can :create, CallList
# call list has one account through a campaign
10:20 < RichGuk> omarqureshi: http://27smiles.com/xbmc-rbp-git-20120630-1-arm.pkg.tar.xz
10:21 < RichGuk> pacman -U xbmc-rbp-git-20120630-1-arm.pkg.tar.xz
Host *
ServerAliveInterval 30
ForwardAgent yes
@omarqureshi
omarqureshi / README.md
Last active October 23, 2022 06:59 — forked from mrrooijen/README.md
Setting up XEN on a Hetzner Dedicated Server (EX-series)

Setting up XEN on a Hetzner Dedicated Server (EX-series)

Author: Michael van Rooijen (@meskyanichi)

DISCLAIMER: I am a programmer, not a sysadmin in my day-to-day life. I provide this guide simply as a self-reference, and as a way to contribute to the community of developers. The main motivation for writing this guide is because of the lack of properly written guides/tutorials. They were either out-dated, inaccurate, in a non-English language or simply too vague to understand (at least for me, as a programmer and not a sysadmin).

I hope this guide helps getting you up and running with your own collection of VPS's on your own Dedicated Server over at Hetzner.de.

Requirements: