Skip to content

Instantly share code, notes, and snippets.


Jan Berkel jberkel

View GitHub Profile
View invalid_links
View gist:edec30d87df49c62b260bf8f086377e6
[:/Volumes/tbaplus/projects/enwikt-dump-rs] 86dfd01* ± rust-lldb ./target/debug/wiktionary_dump2 -- dump_parsed_templates --input enwiktionary-20191201-pages-articles-multistream.xml --format cbor --templates templates --namespaces template
error: module importing failed: Missing parentheses in call to 'print'. Did you mean print('Whoops! You are missing the <' + arg.argName + '> argument.')? (, line 98)
File "", line 1, in <module>
(lldb) command script import "/usr/local/Cellar/rust/1.39.0/lib/rustlib/etc/"
(lldb) type summary add --no-value --python-function lldb_rust_formatters.print_val -x ".*" --category Rust
(lldb) type category enable Rust
(lldb) target create "./target/debug/wiktionary_dump2"
Current executable set to './target/debug/wiktionary_dump2' (x86_64).
(lldb) settings set -- "dump_parsed_templates" "--input" "enwiktionary-20191201-pages-articles-multistream.xml" "--format" "cbor" "--templates" "templates" "--namespaces" "template"
View brouter.gpx
<?xml version="1.0" encoding="UTF-8"?>
<!-- track-length = 79030 filtered ascend = 1046 plain-ascend = 380 cost=144766 -->
creator="BRouter-1.4.11" version="1.1">
View map.geojson
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View gist:c9c29a04f05956705ec9
import com.almworks.sqlite4java.SQLiteConnection;
import com.almworks.sqlite4java.SQLiteException;
import com.almworks.sqlite4java.SQLiteStatement;
import de.tudarmstadt.ukp.jwktl.api.IWiktionaryEntry;
import de.tudarmstadt.ukp.jwktl.api.IWiktionarySense;
import de.tudarmstadt.ukp.jwktl.api.WiktionaryException;
import de.tudarmstadt.ukp.jwktl.api.entry.WiktionaryEntry;
import de.tudarmstadt.ukp.jwktl.api.entry.WiktionaryPage;
import de.tudarmstadt.ukp.jwktl.api.util.ILanguage;
import de.tudarmstadt.ukp.jwktl.parser.util.IDumpInfo;
View gist:9970719
def html = new URL("").getText()
def images = html =~ /img src=['"](http:\/[^"']*\.gif)['"]/
def gif = images.collect { it[1] }[0]
if (gif != null) {
<img src="<%= gif %>"/>
<% } %>
View gist:7692706
$ java \
-Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.SimpleLog \
-Dorg.apache.commons.logging.simplelog.showdatetime=true \ \
jberkel / gist:7574502
Created Nov 21, 2013
simulating iOS reachability
View gist:7574502
$ host is an alias for is an alias for has address
$ sudo route add -host -interface gif0
add host gateway gif0
$ scutil -r
Reachable,Transient Connection,Connection Required
$ scutil
View gist:5542181 do |s| = "sqlite3"
s.version = ""
s.summary = "SQLite is an embedded SQL database engine."
s.homepage = ""
s.license = "Public Domain" = {"D. Richard Hipp" => ""}
sqlite_version_format = "%.1d%.2d%.2d%.2d" % s.version.to_s.split('.').push(0)
jberkel / xctool.rb
Last active Dec 17, 2015
formula for xctool
View xctool.rb
# to install:
# curl > /usr/local/Library/Formula/xctool.rb && brew install xctool --HEAD
require 'formula'
class Xctool < Formula
homepage ''
head ''
def install
system "./"
You can’t perform that action at this time.