Skip to content

Instantly share code, notes, and snippets.

View harryf's full-sized avatar

Harry Fuecks harryf

  • Zürich, Switzerland
View GitHub Profile
@harryf
harryf / backup-keepass.sh
Created January 20, 2020 15:24
Quick script for making incremental backups of a keepass database. Combine with Google Drive (or similar) for syncing across devices...
#!/bin/sh
# Cron job
# 15 10 * * * /Users/<username>/bin/backup-passwords
# may need some hacks to get crontab running on OSX
DIR="$HOME/GoogleDrive/passwords"
PASSWDF="$DIR/passwords2.kdbx"
BACKUPF="$DIR/passwords2-"$(date "+%Y%m%d")".kdbx"
Verifying my Blockstack ID is secured with the address 1LTjWdry6oRq8bFCjEJ1egeikJD87Pedyo https://explorer.blockstack.org/address/1LTjWdry6oRq8bFCjEJ1egeikJD87Pedyo
@harryf
harryf / gist:df0cda4af13369246c3c
Created March 2, 2016 19:18
hacks to make tasty-imitiation-keyboard importable from another project
diff --git a/Keyboard/DirectionEnum.swift b/Keyboard/DirectionEnum.swift
index 5371350..3fcd9d4 100644
--- a/Keyboard/DirectionEnum.swift
+++ b/Keyboard/DirectionEnum.swift
@@ -6,13 +6,13 @@
// Copyright (c) 2014 Alexei Baboulevitch ("Archagon"). All rights reserved.
//
-enum Direction: Int, CustomStringConvertible {
+public enum Direction: Int, CustomStringConvertible {
@harryf
harryf / Insulter
Created November 7, 2015 12:18
Provides a random insult in German to anyone who presses the button
/*
Requirements: http://www.techwillsaveus.com/shop/diy-kits/diy-gamer-kit-arduino/
*/
#include <Gamer.h>
Gamer gamer;
String insults[10] = {
"Schlampe",
"Idiot!",

Keybase proof

I hereby claim:

  • I am harryf on github.
  • I am harryf (https://keybase.io/harryf) on keybase.
  • I have a public key whose fingerprint is 69D7 1737 17F1 185F 91EB 5885 C54C 56AD A24C BC70

To claim this, I am signing this object:

#!/bin/sh
curl -XGET localhost:9200/drs/shows/_search -d '
{
"query" : {
"match_all" : { }
},
"facets" : {
"today_facet" : {
"query" : {
"term" : { "text" : "heute" }
curl -XPUT 'http://192.168.80.67:9200/_river/techup_couch/_meta' -d '{
"type" : "couchdb",
"couchdb" : {
"host" : "192.168.80.67",
"port" : 5984,
"db" : "techup_couch",
"filter" : null
}
}'
echo ""
@harryf
harryf / search.sh
Created December 30, 2010 18:49
more advanced search
#!/bin/sh
echo "\nSearching..."
curl -XGET 'http://localhost:9200/techup/events/_search' -d @- <<EOF
{
"query" : {
"filtered" : {
"query" : {
"query_string" : {
"query" : "twitter"
}
{"took":4,
"_shards":
{"total":5,
"successful":5,
"failed":0},
"hits":
{"total":2,
"max_score":null,
"hits":[
{"_index":"techup",
@harryf
harryf / mapping.sh
Created December 30, 2010 17:31
An elasticsearch mapping for techup events
#!/bin/sh
echo "Deleting index"
curl -XDELETE 'http://localhost:9200/techup/'
echo "\nCreating index"
curl -XPUT 'http://localhost:9200/techup/'
echo "\nApplying mapping"
curl -XPUT 'http://localhost:9200/techup/events/_mapping' -d '
{