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 'rubygems' | |
require 'nokogiri' | |
require 'gollum' | |
wiki = Gollum::Wiki.new('auxwiki') | |
name = 'Ilja Krijger' | |
email = 'ilja@quittheprogram.org' | |
f = File.open("AuxiliumWiki-20110705103347.xml") |
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
def normalized_content_from_content | |
if client | |
options = { | |
blacklisted_elements: client.article_blacklisted_elements, | |
whitelisted_tags: client.article_whitelisted_tags, | |
} | |
else | |
options = nil | |
end | |
ContentNormalization.new(content, options).normalized_content if content |
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
# /etc/init/sidekiq.conf - Sidekiq config | |
# This example config should work with Ubuntu 12.04+. It | |
# allows you to manage multiple Sidekiq instances with | |
# Upstart, Ubuntu's native service management tool. | |
# | |
# See aperture-workers.conf for how to manage all Sidekiq instances at once. | |
# | |
# Save this config as /etc/init/sidekiq.conf then mange sidekiq with: | |
# sudo start sidekiq index=0 |
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
Capybara.register_driver :chrome do |app| | |
Capybara::Selenium::Driver.new(app, :browser => :chrome, :service_log_path => 'chromedriver.out') | |
end | |
Capybara.default_driver = :chrome | |
include Capybara::DSL | |
visit "https://google.com" |
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
@echo off | |
cls | |
:start | |
echo. | |
echo 1 Fine Arts | |
echo 2 Classics | |
echo 3 Computer Science | |
echo 4 English | |
echo 5 Mathematics | |
echo 6 Modern World Languages and Culture |
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 'time' | |
class ContentSourcesGenerator | |
HOUR = 3600 | |
START_TS = Time.parse('2013-10-01 00:00:00 +00').utc | |
END_TS = Time.parse('2015-01-01 00:00:00 +00').utc | |
attr_accessor :values | |
def each_client |
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 Thing | |
attr_accessor :failure_proc | |
def when_it_fails(&block) | |
self.failure_proc = block | |
end | |
def do_the_thing(args) | |
rescue | |
failure_proc.call if failure_proc |
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
tau.mashups | |
.addModule('BoardClassOfServices.config', function() { | |
'use strict'; | |
return { | |
// type of background; if 'single', first match rule color will be applied as background, | |
// if 'gradient', all colors from all found rules will be applied as gradient background */ | |
colorType: 'gradient', // gradient | single |
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
return new RSVP.Promise(function(resolve, reject) { | |
var fileReaders = fileNames.map(function(filename) { | |
return readFile('dist/'+filename); | |
}); | |
RSVP.all(fileReaders).then(function(fileContents) { | |
fileUploaders = fileContents.map(function(fileContents, fileIdx) { | |
return this._uploadIfNotAlreadyInUploadList(uploadName, fileNames[fileIdx], fileContents); | |
}); | |
RSVP.all(fileUploaders).then(resolve).catch(reject); | |
}); |
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
java_script: | |
config_file: .jshintrc |
OlderNewer