Skip to content

Instantly share code, notes, and snippets.

View halfdan's full-sized avatar
🇩🇪

Fabian Becker halfdan

🇩🇪
View GitHub Profile
@thelinuxlich
thelinuxlich / shipitfile.js
Last active September 13, 2017 07:36
Shipitfile example
var project_name = "YOUR_PROJECT_NAME",
project_url = 'YOUR_GIT_URL',
project_destination_server = 'USER@SERVER',
project_destination_dir = '/PROJECT_DIRECTORY',
webhookUri = "SLACK_TOKEN_URI",
Slack = require('slack-node'),
slack = new Slack(),
notify = function(text) {
slack.webhook({
channel: "#notifications",
@rorra
rorra / sitemap_generator.rb
Created January 28, 2012 10:19
sitemap_generator and s3 with paperclip and aws-s3
require 'aws'
class Rake::Task
def replace &block
@actions.clear
prerequisites.clear
enhance &block
end
end
# Basic text search with relevancy for MongoDB.
# See http://blog.tty.nl/2010/02/08/simple-ranked-text-search-for-mongodb/
# Copythingie 2010 - Ward Bekker - ward@tty.nl
#create (or empty) a docs collection
doc_col = MongoMapper.connection.db('example_db').collection('docs')
doc_col.remove({})
#add some sample data
doc_col.insert({ "txt" => "it is what it is"})