$ brew install pdnsd
$ sudo chown -R nobody /usr/local/var/cache/pdnsd
$ curl -L http://goo.gl/kMlyQ -o pdnsd.conf
$ mv pdnsd.conf /usr/local/etc
$ sudo chown root /usr/local/etc/pdnsd.conf
This file contains 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 ckeditor/dialogui | |
// //= require ckeditor/dialog | |
// //= require ckeditor/clipboard |
This file contains 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
class CommentCreated < Action | |
include WatchersToBeNotified | |
watchers_to_be_notified { | |
ticket_attr_reader :ticket | |
categories { | |
agents to_be_notified_if: :all_comments | |
user_assignees to_be_notified_if: :comment_assignment | |
group_assignees to_be_notified_if: :comment_group_assignment |
This file contains 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
describe RepoSynchronizationJob do | |
it 'sets refreshing_repos to true before synchronization' do | |
is_refreshing_repos_set_to_true = Proc.new do |user_id| | |
User.find(user_id).refreshing_repos == true | |
end | |
user = create(:user, refreshing_repos: false) | |
github_token = 'token' | |
expect(user.refreshing_repos).to be_false | |
flexmock(RepoSynchronization).should_receive(:call).with(FlexMock.on(&is_refreshing_repos_set_to_true), Flexmock.any).once |
This file contains 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 'mock_redis' | |
class Feature | |
class << self | |
attr_accessor :redis | |
end | |
def initialize(name) | |
@name = name | |
end |
This file contains 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
# ... | |
namespace :deploy do | |
desc 'Restart application' | |
task :restart => ["eye:reload", "eye:restart"] | |
after :published, :restart | |
end |
This file contains 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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains 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 'ansi' | |
def puts_red(text) | |
puts ANSI.red { text } | |
end | |
def puts_green(text) | |
puts ANSI.green { text } | |
end |
This file contains 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
-- Using http://www.learnyouahaskell.com/ as reference | |
data Coordinate = Coordinate Int Int deriving(Show, Eq) | |
data Direction = North | West | South | East deriving(Show, Eq) | |
data Position = Position Coordinate Direction deriving(Show, Eq) | |
instance Enum Direction where | |
toEnum 0 = North | |
toEnum 1 = East | |
toEnum 2 = South |
This file contains 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
RedactorPlugins.fontcolor = function () { | |
init: function() { | |
// code | |
// Would be nice to have something like | |
this.registerButton(buttonKey, buttonTitle, buttonCallback, buttonDropDown) | |
// instead of | |
// this.buttonAdd(buttonKey, buttonTitle, buttonCallback, buttonDropDown) | |
// which just adds the button to the end of the toolbar | |
OlderNewer