Skip to content

Instantly share code, notes, and snippets.

class Net::LDAP
def initialize(args = {})
@host = args[:host] || DefaultHost
@port = args[:port] || DefaultPort
@verbose = false # Make this configurable with a switch on the class.
@auth = args[:auth] || DefaultAuth
@base = args[:base] || DefaultTreebase
encryption args[:encryption] # may be nil
#!/usr/bin/env ruby
if !ARGV[0] or !ARGV[1]
puts "You must specify the raw and enhanced directories. Try again!"
exit
end
# first we find the full path of the arguments in case we're only given
# partial paths.
raw_input_file_path = File.expand_path(ARGV[0])
@jronallo
jronallo / students-jumping-in-front-of-memorial-bell-tower.html
Created February 9, 2012 16:28 — forked from niklasl/students-jumping-in-front-of-memorial-bell-tower.html
An HTML5+RDFa1.1 version of an example article by Jason Ronallo
<!-- An RDFa 1.1 version of the data presented in the article
"HTML5 Microdata and Schema.org" at
<http://journal.code4lib.org/articles/6400>.
The article is licensed under a Creative Commons Attribution 3.0 United
States License. This example code should be consired a remix thereof. -->
<div id="main" role="main" class="container_12" vocab="http://schema.org/" resource="" typeof="ItemPage">
<h2 id="page_name" property="name">
Students jumping in front of Memorial Bell Tower
</h2>
<div class="grid_5" resource="http://www.freebase.com/m/026twjv">
@jronallo
jronallo / Gemfile
Created February 11, 2012 22:27 — forked from simi/Gemfile
Refinery + Twitter Bootstrap WIP
source 'https://rubygems.org'
gem 'rails', '3.2.1'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
gem 'sqlite3'
@jronallo
jronallo / markdown.xml
Created December 2, 2012 15:26 — forked from lg0/markdown.xml
Markdown Syntax Highlighting for Sublime text 2
<!-- copy this to YOUR_THEME.tmTheme-->
<dict>
<key>name</key>
<string>diff: deleted</string>
<key>scope</key>
<string>markup.deleted</string>
<key>settings</key>
<dict>
<key>background</key>
<string>#EAE3CA</string>
<!DOCTYPE html>
<html>
<head>
<base href="http://d.lib.ncsu.edu/collections/catalog/mc00096-001-ff0155-000-001_0001" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width; initial-scale=1.0">
/**
* "Google Now" Card
*/
body {
background: #e1e1e1;
min-height: 100%;
margin: auto;
}
ul.gNow {
width: 450px;
@jronallo
jronallo / NC-HB2-ids.sh
Created February 16, 2017 00:53 — forked from cazzerson/NC-HB2-ids.sh
Extracting HB2 Tweet IDs from multiple twarc datasets
# This script requires the jq utility
# https://stedolan.github.io/jq/
# Datasets created with twarc
# https://github.com/DocNow/twarc
mkdir -p NCHB2-ids
rm NCHB2-ids/NCHB2*
touch NCHB2-ids/NCHB2-ids-with-dupes.txt
# Create more relevant subset of "North Carlina" search