This file contains hidden or 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
#!/usr/bin/ruby | |
# Author: Saleem Ansari <[email protected]> | |
# License: GPLv2 | |
# Requirements: | |
# # yum install rubygem-gem2rpm | |
# # yum install ruby rubygems | |
# # yum install rpmdevtools | |
# |
This file contains hidden or 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
#!/usr/bin/ruby | |
# Convert a spreadsheet contents into Trac Wiki format | |
# How to use? | |
# sudo gem install spreadsheet | |
# ruby tracwiki.rb /path/to/spreadsheet.xls "sheet-name" | |
# | |
require 'rubygems' | |
require 'spreadsheet' | |
xlsfile = ARGV[0] if ARGV.length > 0 |
This file contains hidden or 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
$ for srpm in *.src.rpm; do koji build --scratch --nowait dist-6E-epel $srpm; done | |
Uploading srpm: rubygem-actionmailer-3.1.0-1.fc16.src.rpm | |
[====================================] 100% 00:00:02 30.30 KiB 14.12 KiB/sec | |
Created task: 3827551 | |
Task info: http://koji.fedoraproject.org/koji/taskinfo?taskID=3827551 | |
Uploading srpm: rubygem-actionpack-3.1.0-1.fc16.src.rpm | |
[====================================] 100% 00:00:03 352.92 KiB 105.16 KiB/sec | |
Created task: 3827553 | |
Task info: http://koji.fedoraproject.org/koji/taskinfo?taskID=3827553 | |
Uploading srpm: rubygem-activemodel-3.1.0-1.fc16.src.rpm |
This file contains hidden or 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
#!/usr/bin/ruby | |
## This file finds all the duplicate files form a directory given | |
## at the command line. | |
## Released under the GPLv2 | |
## Copyright (C) tuxdna(at)gmail(dot)com | |
require 'digest/md5' | |
require 'fileutils' |
This file contains hidden or 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
#!/usr/bin/env ruby | |
# filename="/proc/5952/maps" | |
def usage | |
puts "USAGE: #{$0} /proc/<pid>/maps" | |
exit | |
end | |
filename=ARGV[0] |
This file contains hidden or 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
import java.util.Random; | |
import java.util.concurrent.ArrayBlockingQueue; | |
import java.util.concurrent.BlockingQueue; | |
class Producer implements Runnable { | |
private static int count = 0; | |
private Random rg = new Random(); | |
private BlockingQueue<Object> queue = null; | |
public Producer(BlockingQueue<Object> queue) { |
This file contains hidden or 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
#!/usr/bin/ruby | |
# File name: insert-mysql.rb | |
# Usage: | |
# $ ruby insert-mysql.rb /path/to/file.pdf "description of file" | |
require 'mysql' | |
require 'mime/types' | |
if ARGV.length < 2 then |
This file contains hidden or 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
<?xml version="1.0" encoding="UTF-8" ?> | |
<!-- | |
Licensed to the Apache Software Foundation (ASF) under one or more | |
contributor license agreements. See the NOTICE file distributed with | |
this work for additional information regarding copyright ownership. | |
The ASF licenses this file to You under the Apache License, Version 2.0 | |
(the "License"); you may not use this file except in compliance with | |
the License. You may obtain a copy of the License at | |
http://www.apache.org/licenses/LICENSE-2.0 |
This file contains hidden or 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
<?xml version="1.0" encoding="UTF-8" ?> | |
<!-- | |
Licensed to the Apache Software Foundation (ASF) under one or more | |
contributor license agreements. See the NOTICE file distributed with | |
this work for additional information regarding copyright ownership. | |
The ASF licenses this file to You under the Apache License, Version 2.0 | |
(the "License"); you may not use this file except in compliance with | |
the License. You may obtain a copy of the License at | |
http://www.apache.org/licenses/LICENSE-2.0 |
This file contains hidden or 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
<dataConfig> | |
<dataSource name="binary_files_db" | |
convertType="false" | |
driver="com.mysql.jdbc.Driver" | |
url="jdbc:mysql://localhost/binary_files" | |
user="binary_user" password="binary_password" | |
/> | |
<dataSource name="fieldReader" | |
type="FieldStreamDataSource" /> |