cd /Library/Preferences
sudo rm com.sophos.sav.plist
cd /Library/Application\ Support/Sophos/cloud/Installer.app/Contents/MacOS/tools/
sudo ./InstallationDeployer —force_remove
UPDATE a fork of this gist has been used as a starting point for a community-maintained "awesome" list: machine-learning-with-ruby Please look here for the most up-to-date info!
- liblinear-ruby: Ruby interface to LIBLINEAR using SWIG
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
module Where | |
class <<self | |
attr_accessor :editor | |
def is_proc(proc) | |
source_location(proc) | |
end | |
def is_method(klass, method_name) | |
source_location(klass.method(method_name)) |

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
require "ffaker" | |
class ActiveRecord::Base | |
def self.define_factory(name=nil, parent=nil, &block) | |
name = [name, "factory"].compact.join("_") | |
scope name, lambda { |overrides={}| | |
parent ||= scoped | |
attributes = instance_eval(&block).merge(overrides) | |
parent.where(attributes) | |
} |
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
# | |
# Draws an unfilled circle, thanks shawn24! | |
# | |
CIRCLE_STEP = 10 | |
def draw_circle(cx,cy,r,color) | |
0.step(360, CIRCLE_STEP) do |a1| | |
a2 = a1 + CIRCLE_STEP | |
$window.draw_line cx + Gosu.offset_x(a1, r), cy + Gosu.offset_y(a1, r), color, cx + Gosu.offset_x(a2, r), cy + Gosu.offset_y(a2, r), color, 9999 | |
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
module Compel | |
extend self | |
def compel(obj, hash) | |
hash.each do |meth, value| | |
meta_eval(obj) { alias_method :"_COMPEL_#{meth}", meth } | |
block = value.is_a?(Proc) ? value : lambda { value } | |
meta_def(obj, meth, &block) | |
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
# This aims to reproduce the State pattern using MicroMachine. | |
# We're just implementing the example from http://github.com/dcadenas/state_pattern | |
require "micromachine" | |
module Stop | |
def self.color | |
"red" | |
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
run "rm public/index.html" | |
file "Isolate", <<-END | |
gem "rails", "3.0.1" | |
gem "haml", "3.0.22" | |
gem "sqlite3-ruby", "1.3.1" | |
env :development do | |
gem "haml-rails", "0.2" | |
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
require "go/gtp/board" | |
require "cutest" | |
setup do | |
string = <<-EOS.gsub(/^ {2}/, "") | |
A B C D E F G H J | |
9 . . . . . . . . . 9 | |
8 . . . . . . . . . 8 | |
7 . . X . . . + . . 7 | |
6 . . . . . . . . . 6 |
NewerOlder