Skip to content

Instantly share code, notes, and snippets.

@rentalcustard
rentalcustard / repo.rb
Last active August 29, 2015 14:01 — forked from ernie/repo.rb
class PersonRepository < Norm::PostgreSQLRepository
def named(name)
select_records(select_statement.where(:name => name)
end
def named_ordered_by_created_at(name)
select_records(select_statement.
where(:name => name).
order(:created_at, :desc))
@rentalcustard
rentalcustard / blanks.py
Created October 4, 2011 14:56 — forked from MrPink/blanks.py
Ganglia Python module to graph results from a SQL query
import sys
import _mysql
import time
import re
def blank_logger(name):
db=_mysql.connect(user="user",passwd="password",db="hitstats")
db.query(""" SELECT sum(if(filename='nginx_timeout',totalhits,0)) blanks
FROM `hitstats`.`serverhits` """)
L
inu
xSy
ste
mAd
min
ist
ratorJo bDesc
rip tionThi spo
sit ionisre spo

#Linux System Administrator

##Job Description This position is responsible for installation, configuration, maintenance and monitoring of all Linux systems.The systems administrator will support daily operations and help develop strategies to improve availability and utilization of Linux environments.

##Essential Functions

  • Personally identify and carry out administration tasks on the servers when required.
  • Manage your own priorities and work flow
  • Identify new requirements and implement them
source 'http://rubygems.org'
gem 'aasm', '2.2.0'
gem 'activeresource', '2.3.11'
gem 'activesupport', '2.3.11'
gem 'acts-as-taggable-on', '2.0.6'
gem 'block_helpers', '0.3.3'
gem 'coderay', '0.9.7'
gem 'fcgi', '0.8.8'
gem 'hoe', '2.9.1'
#RSpec Mocks...
it "does something with a collaborator" do
#Given
collab = mock(:collab)
it.collaborator = collab
#Then
collab.should_receive(:call).with(3)
#When
#RSpec Mocks...
it "does something with a collaborator" do
#Given
collab = mock(:collab)
it.collaborator = collab
#Then
collab.should_receive(:call).with(3)
#When