Skip to content

Instantly share code, notes, and snippets.

import java.io.IOException;
import java.net.ConnectException;
import java.net.HttpURLConnection;
import java.net.MalformedURLException;
import java.net.SocketTimeoutException;
import java.net.URL;
import java.net.URLConnection;
import java.net.UnknownHostException;
/**
actconvenios.jar
actjuzgadosws.jar
acttutelasws.jar
anulacionws.jar
audiows.jar
axis-1.4.jar
axis-jaxrpc(CONFLICTO)-1.4.jar
barbecue-1.0.6b.jar
BrokerClient.jar
BrokerCommons.jar
<?xml version="1.0"?>
<application-server xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://xmlns.oracle.com/oracleas/schema/application-server-10_1.xsd" localhostIsAdmin="true"
application-directory="../applications"
check-for-updates="adminClientOnly"
deployment-directory="../application-deployments"
connector-directory="../connectors"
schema-major-version="10" schema-minor-version="0" >
<shared-library name="log4j" version="1.2.15">
require 'rubygems'
require 'bibtex'
b = BibTeX.open('./Sources_3_3_1.bib')
b.each { |citation|
if(citation.type != "comment" and ! citation.key.match(/^BR3/) )
citation.key = "BR3-#{citation.key}"
@mfcabrera
mfcabrera / tumlecturesgen.rb
Created October 9, 2012 13:21
Generation of Courses out of MyinTUM
require 'rubygems'
require 'open-uri'
require 'pp'
require 'nokogiri'
class Lecture
attr_accessor :module_id,:title,:ects, :cycle,:language,:area,:name
attr_reader :urlimytum
@@urlimytum_root = "https://drehscheibe.in.tum.de/myintum/kurs_verwaltung/"
@mfcabrera
mfcabrera / thingsexporttodos.rb
Last active December 13, 2015 17:38
A script using MacRuby to export all the todos from Things projects into text files (my goal is to "copy and paste" them into 2DO.
#make sure you use macruby
framework "ScriptingBridge" #let's use the scripting bridge framework
# this is aweful - maybe a wrapper would be nice
# you can ge this BundleIdentifier using the mdls
# mdls -name kMDItemCFBundleIdentifier /Applications/Things.app
things = SBApplication.applicationWithBundleIdentifier("com.culturedcode.things")
<ref...> ... </ref>
#!/usr/bin/perl
# Program to filter Wikipedia XML dumps to "clean" text consisting only of lowercase
# letters (a-z, converted from A-Z), and spaces (never consecutive).
# All other characters are converted to spaces. Only text which normally appears
# in the web browser is displayed. Tables are removed. Image captions are
# preserved. Links are converted to normal text. Digits are spelled out.
# Adapted for the german language based on the script written by Matt Mahoney
# http://mattmahoney.net/dc/textdata.html
def delimited(filename, delimiter=' ', bufsize=4096):
'''
Creates a generator of word from a file based on a delimiter (by default white space).
'''
buf = ''
with open(filename) as file:
while True:
newbuf = file.read(bufsize)
if not newbuf:
COPY (
select r.cluster_id, r.token_array from hotel4x.review as r where
r.lang = 'en' and r.cluster_id in
(SELECT h.cluster_id
FROM hotel4x.hotel AS h
INNER JOIN (
SELECT s.cluster_id, COUNT(*) AS source_count
FROM hotel4x.source AS s