Skip to content

Instantly share code, notes, and snippets.

Avatar

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.')? (fblldb.py, line 98)
File "temp.py", line 1, in <module>
(lldb) command script import "/usr/local/Cellar/rust/1.39.0/lib/rustlib/etc/lldb_rust_formatters.py"
(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 -- target.run-args "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 -->
<gpx
xmlns="http://www.topografix.com/GPX/1/1"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd"
creator="BRouter-1.4.11" version="1.1">
<trk>
<name>brouter_trekking_0</name>
<trkseg>
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("http://www.gifbin.com/random").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 \
-Dorg.apache.commons.logging.simplelog.log.org.apache.http=DEBUG \
-Dorg.apache.commons.logging.simplelog.log.org.apache.http.wire=ERROR
@jberkel
jberkel / gist:7574502
Created Nov 21, 2013
simulating iOS reachability
View gist:7574502
$ host api.soundcloud.com
api.soundcloud.com is an alias for api-cdn.l.soundcloud.com.
api-cdn.l.soundcloud.com is an alias for cs97.wac.edgecastcdn.net.
cs97.wac.edgecastcdn.net has address 93.184.220.127
$ sudo route add -host 93.184.220.127 -interface gif0
add host 93.184.220.127: gateway gif0
$ scutil -r api.soundcloud.com
Reachable,Transient Connection,Connection Required
$ scutil
View gist:5542181
Pod::Spec.new do |s|
s.name = "sqlite3"
s.version = "3.7.16.2"
s.summary = "SQLite is an embedded SQL database engine."
s.homepage = "http://www.sqlite.org"
s.license = "Public Domain"
s.author = {"D. Richard Hipp" => "drh@hwaci.com"}
sqlite_version_format = "%.1d%.2d%.2d%.2d" % s.version.to_s.split('.').push(0)
@jberkel
jberkel / xctool.rb
Last active Dec 17, 2015
formula for xctool
View xctool.rb
# to install:
# curl https://raw.github.com/gist/5525293 > /usr/local/Library/Formula/xctool.rb && brew install xctool --HEAD
require 'formula'
class Xctool < Formula
homepage 'https://github.com/facebook/xctool.git'
head 'https://github.com/facebook/xctool.git'
def install
system "./build.sh"
You can’t perform that action at this time.