Skip to content

Instantly share code, notes, and snippets.

Avatar
🏡

Jens Hausherr jabbrwcky

🏡
View GitHub Profile
@jabbrwcky
jabbrwcky / brew_inventory.sh
Last active Sep 25, 2018
Script to create an inventory of installed brews, casks and taps for Homebrew as Markdown file. Requires an installation of jq (https://stedolan.github.io/jq/)
View brew_inventory.sh
#!/usr/bin/env bash
if [ $# -eq 1 ]; then
file=$1
else
file=brew_inventory.md
fi
cat << EOF >$file
# Brew Inventory
@jabbrwcky
jabbrwcky / log output
Last active Aug 29, 2015
Added log output
View log output
| bind_parameters: {:graph=>"core_api_graph", :model_key=>"6160132536", :edge_collection=>"ownerships", :direction=>:inbound}
POST http://localhost:8529/_db/core_api_development/_api/cursor
POST http://localhost:8529/_db/core_api_development/_api/cursor 201
GET http://localhost:8529/_db/core_api_development/_api/gharial/core_api_graph
GET http://localhost:8529/_db/core_api_development/_api/gharial/core_api_graph 200
[AQL] FOR n IN GRAPH_NEIGHBORS(@graph,
{ _key: @model_key },
{ direction: @direction, edgeCollectionRestriction: @edge_collection })
RETURN n.vertex
| bind_parameters: {:graph=>"core_api_graph", :model_key=>"407808385", :edge_collection=>"ownerships", :direction=>:outbound}
View keybase.md

Keybase proof

I hereby claim:

  • I am jabbrwcky on github.
  • I am jabbrwcky (https://keybase.io/jabbrwcky) on keybase.
  • I have a public key whose fingerprint is 99F4 212F B061 4089 887E 1376 13D4 F7C4 5D29 88D8

To claim this, I am signing this object:

View gist:5830562
class PropertyPdf < Prawn::Document
def initialize(property)
super(top_margin: 70)
@property = property
@qrcode_content = 'http://tbd.com'
qrcode = RQRCode::QRCode.new('http://tbd.com', :size => 6, :level => :h )
building_heading
end
@jabbrwcky
jabbrwcky / dynamicVersion.gradle
Created Nov 2, 2012
Dynamic versions for gradle, git-flow and Java development
View dynamicVersion.gradle
/*
* This work is licensed under the Creative Commons Attribution 3.0 Unported License.
*
* To view a copy of this license, visit http://creativecommons.org/licenses/by/3.0/
* or send a letter to Creative Commons, 444 Castro Street, Suite 900, Mountain View, California, 94041, USA.
*/
/*
* Define your version here
*/
@jabbrwcky
jabbrwcky / StringCleaner.java
Created Mar 19, 2012
StringCleaner: a demonstration how to use ICU4j to convert practically any UTF-8/Java String to some ASCII compatible form. Requires ICU4J, TestNG and Findbugs-Annotations.
View StringCleaner.java
package net.hausherr.util;
import com.ibm.icu.text.Normalizer;
import java.util.HashMap;
import java.util.Map;
/**
* StringCleaner provides a method for normalizing a string to generally
* ASCII-compatible form.
@jabbrwcky
jabbrwcky / InsecureHttpClient.java
Created Feb 6, 2012
A sample how to configure Apache HTTPClient (4.+) to accept SSL connections *without* certificate and hostname validation
View InsecureHttpClient.java
package net.hausherr.sample;
import org.apache.http.client.CookieStore;
import org.apache.http.conn.routing.HttpRoute;
import org.apache.http.conn.routing.HttpRoutePlanner;
import org.apache.http.conn.scheme.PlainSocketFactory;
import org.apache.http.conn.scheme.Scheme;
import org.apache.http.conn.scheme.SchemeRegistry;
import org.apache.http.conn.ssl.SSLSocketFactory;
import org.apache.http.conn.ssl.TrustStrategy;
You can’t perform that action at this time.