Skip to content

Instantly share code, notes, and snippets.

@krobertson
krobertson / fakeldap.rb
Created January 10, 2009 01:34
fakeldap - fake data generator for LDAP
#
# Ugly little script I used when I needed to generate an LDAP DB with 100k sample users
#
require 'rubygems'
require 'faker'
require 'active_ldap'
ActiveLdap::Base.establish_connection(
:host => '10.0.0.8',
@shaoshing
shaoshing / number2txt for SuperMemo
Last active August 2, 2022 20:43
Ruby script to convert Numbers file to txt, so that it can be imported into Supermemo.
#!/usr/bin/env ruby
#
# Usages
# num2txt path/to/your/file.numbers
require 'csv'
if !ARGV[0]
puts "Please specify a number file."
@ebeigarts
ebeigarts / RAILS_RELATIVE_URL_ROOT.md
Last active February 2, 2023 15:16
RAILS_RELATIVE_URL_ROOT

RAILS_RELATIVE_URL_ROOT

Rails

By default RAILS_RELATIVE_URL_ROOT is used only for asset pipeline.

To namespace your rails routes you need to wrap run MyApp::Application with map in your config.ru:

map ENV['RAILS_RELATIVE_URL_ROOT'] || "/" do
@voxxit
voxxit / RUNBOOK.md
Created April 29, 2016 14:26
Example of a solid run book/operations manual

Run Book / Operations Manual

  1. Table of Contents
  2. System Overview
    • Service Overview
    • Contributing Applications, Daemons, and Windows Services
    • Hours of Operation
    • Execution Design
    • Infrastructure and Network Design
    • Resilience, Fault Tolerance and High-Availability