The easiest way to get the ClamAV package is using Homebrew
$ brew install clamav
Before trying to start the clamd
process, you'll need a copy of the ClamAV databases.
Create a freshclam.conf
file and configure as so
require 'rubygems' | |
require 'sinatra' | |
require 'redis' | |
# To use, simply start your Redis server and boot this | |
# example app with: | |
# ruby example_note_keeping_app.rb | |
# | |
# Point your browser to http://localhost:4567 and enjoy! | |
# |
#!/usr/bin/env ruby | |
require 'rubygems' | |
require 'thor' | |
require 'chef' | |
require 'chef/node' | |
require 'chef/rest' | |
# Please see the readme for overview documentation. | |
# |
require 'digest/sha1' | |
class String | |
def hash | |
Digest::SHA1.hexdigest self | |
end | |
def bit | |
"%0160b" % to_i(16) | |
end |
# Build an inverted index for a full-text search engine with Redis. | |
# Copyright (C) 2009 Salvatore Sanfilippo. Under the BSD License. | |
# USAGE: | |
# | |
# ruby invertedindex.rb add somedir/*.c | |
# ruby invertedindex.rb add somedir/*.txt | |
# ruby search your query string | |
require 'rubygems' | |
require 'redis' |
# Sprinkle setup script for our CI server (Ruby 1.9/Git/PostgreSQL/nginx reverse proxy) | |
# | |
package :build_essential do | |
description 'Build tools' | |
apt 'build-essential' do | |
# Update the sources and upgrade the lists before we build essentials | |
pre :install, ['aptitude update', 'aptitude safe-upgrade', 'aptitude full-upgrade'] | |
end | |
end |
-- Index hit rate | |
WITH idx_hit_rate as ( | |
SELECT | |
relname as table_name, | |
n_live_tup, | |
round(100.0 * idx_scan / (seq_scan + idx_scan),2) as idx_hit_rate | |
FROM pg_stat_user_tables | |
ORDER BY n_live_tup DESC | |
), |
The easiest way to get the ClamAV package is using Homebrew
$ brew install clamav
Before trying to start the clamd
process, you'll need a copy of the ClamAV databases.
Create a freshclam.conf
file and configure as so
module ApplicationHelper | |
def current_user | |
@current_user ||= warden.authenticate(:scope => :user) | |
end | |
end |
var osa = require('osa2'); | |
var fs = require('fs'); | |
var chokidar = require('chokidar'); | |
var watcher = chokidar.watch('/Users/rup/Desktop/trolls', { | |
ignored: /(^|[\/\\])\../, | |
ignoreInitial: true, | |
persistent: true, | |
}); |