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 'java' | |
dir = Dir.new("***CLASSPATH_DIR***") | |
dir.each {|file| $CLASSPATH << dir.path + file if file.end_with?('jar')} | |
java_import com.hp.hpl.jena.rdf.model.ModelFactory; | |
java_import com.hp.hpl.jena.rdf.model.impl.StatementImpl; | |
java_import java.lang.System; |
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 'java' | |
dirs = [Dir.new('***classpath_dir***')] | |
dirs.each {|dir| dir.each{|file| $CLASSPATH << dir.path + file if file.end_with?('jar')}} | |
java_import '***.ContentNegotiator' | |
java_import '***.JsonRdfSerializer' | |
java_import '***.JenaOntologyHelper' |
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 'java' | |
dir = Dir.new('***classpath_dir***') | |
dir.each {|file| $CLASSPATH << dir.path + file if file.end_with?('jar')} | |
java_import org.openrdf.repository.Repository; | |
java_import org.openrdf.repository.RepositoryConnection; | |
java_import org.openrdf.repository.http.HTTPRepository; | |
java_import org.openrdf.model.URI; | |
java_import org.openrdf.repository.RepositoryException; |
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
cat changeset.xml | sed '/<cs:removal>/ { | |
N | |
s|<cs:removal>\n|<cs:removal>| | |
N | |
s|</rdf:Statement>\n|</rdf:Statement>| | |
}' | sed 's|<cs:removal>.*</cs:removal>||' > changeset_addition.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
Dir.entries(".").each { |filename| if (filename =~ /\A[0-9]{3}-[a-zA-Z0-9]+-(.+)-small(.mp4)\Z/) then File.rename(filename, $1+$2) end } |
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
slow - ffmpeg -loop_input -shortest -y -i trevor_dale.jpg -i TrevorDale_Summer88.mp3 -acodec copy -vcodec mjpeg TrevorDale_Summer88.avi | |
fast - ffmpeg -f image2 -loop_input -i MichaelWatford_SoIntoYou\(DubMix\).jpg -i MichaelWatford_SoIntoYou\(DubMix\).mp3 -vcodec mpeg4 -qscale 2 -acodec copy -shortest MichaelWatford_SoIntoYou\(DubMix\)2.avi |
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
ffmpeg -ss 00:40:00 -t 1200 -i E3-1080.mp4 -acodec copy -vcodec copy E3-3-1080.mp4 |
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
Object.send(:define_method, :eigen, lambda{ class << self; self; end }) #crack open the eigenclass |
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
# Please rewrite the MyString definition, without using ruby keywords | |
# http://www.ruby-doc.org/docs/keywords/1.9/ | |
class MyString < String | |
class << self | |
def alphabet | |
'abc' | |
end | |
end |
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
## Run rake rebuild | |
# | |
#task :rebuild do | |
# DiscogsServer.shutdown | |
# | |
# DiscogsServer.delete_disks | |
# | |
# DiscogsServer.delete_configs | |
# | |
# DiscogsServer.create_disks |
OlderNewer