Skip to content

Instantly share code, notes, and snippets.

View binwiederhier's full-sized avatar

Philipp C. Heckel binwiederhier

View GitHub Profile
@binwiederhier
binwiederhier / gist:641c4fc59edcba456c0e
Created August 14, 2014 20:41
BZR bash completion
# Programmable completion for the Bazaar-NG bzr command under bash.
# Known to work with bash 2.05a as well as bash 4.1.2, and probably
# all versions in between as well.
# Based originally on the svn bash completition script.
# Customized by Sven Wilhelm/Icecrash.com
# Adjusted for automatic generation by Martin von Gagern
# Generated using the bash_completion plugin.
# See https://launchpad.net/bzr-bash-completion for details.
/*
* Syncany, www.syncany.org
* Copyright (C) 2011-2014 Philipp C. Heckel <philipp.heckel@gmail.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
@binwiederhier
binwiederhier / gist:f59ac5f410263175ad5e
Created March 24, 2015 23:19
Syncany guide as man page
.\" Man page generated from reStructuredText.
.
.TH "SYNCANY" "1" "March 24, 2015" "0.2.1-alpha" "Syncany"
.SH NAME
syncany \- Syncany User Guide
.
.nr rst2man-indent-level 0
.
.de1 rstReportMargin
\\$1 \\n[an-margin]
@binwiederhier
binwiederhier / README.md
Last active January 27, 2018 08:31
OpenSSH 6.6p1 patch: AuthorizedKeysCommand with additional argument <fingerprint>

Make and run

apt-get source openssh-server
apt-get install libssl-dev 
cd openssh-6.6p1

# Apply patch
patch -p1 openssh/openssh-6.6p1/auth2-pubkey.c < auth2-pubkey.c.patch
java.lang.RuntimeException: java.sql.SQLException: java.lang.OutOfMemoryError: Java heap space
at org.syncany.database.dao.FileVersionSqlDao.getFileTree(FileVersionSqlDao.java:400)
at org.syncany.database.dao.FileVersionSqlDao.getCurrentFileTree(FileVersionSqlDao.java:178)
at org.syncany.database.SqlDatabase.getCurrentFileTree(SqlDatabase.java:232)
at org.syncany.operations.status.StatusOperation.execute(StatusOperation.java:95)
at org.syncany.operations.up.UpOperation.checkPreconditions(UpOperation.java:445)
at org.syncany.operations.up.UpOperation.execute(UpOperation.java:130)
at org.syncany.operations.watch.WatchOperation.runSync(WatchOperation.java:254)
at org.syncany.operations.watch.WatchOperation.execute(WatchOperation.java:140)
at org.syncany.operations.daemon.WatchRunner$1.run(WatchRunner.java:83)

Keybase proof

I hereby claim:

  • I am binwiederhier on github.
  • I am binwiederhier (https://keybase.io/binwiederhier) on keybase.
  • I have a public key whose fingerprint is 75BE 1D97 01CD E8D3 ECC2 4630 E002 DC57 375E 60F1

To claim this, I am signing this object:

# ./resilver
[So 4. Okt 22:02:28 BST 2015] Activating slow mirror ... OK
[So 4. Okt 22:02:39 BST 2015] Waiting 60 seconds for resilvering to start ... OK
[So 4. Okt 22:03:39 BST 2015] Waiting for resilvering to finish ..................................... OK
[So 4. Okt 22:05:22 BST 2015] Activating slow mirror ... OK
@binwiederhier
binwiederhier / README.md
Created January 13, 2016 00:22
Unattended single disk resize
  1. Create /usr/share/initramfs-tools/hooks/parttools as above
  2. Run update-initramfs -u
  3. Reboot
  4. Type e on the Grub2 boot menu entry
  5. Add break=mount to the kernel line
  6. In initramfs, run this (assuming /dev/sda1 is the to-be-resized disk):
e2fsck -f /dev/sda1
resize2fs /dev/sda1 20G
# apt-add-repository ppa:zfs-native/stable
# apt-get update
# apt-get install ubuntu-zfs
# apt-get install debootstrap
HOST=vm1
DISKS="/dev/disk/by-id/ata-Samsung_SSD_850_EVO_120GB_S21UNSAG310692M"
zpool create \
-f \
apt-get install debootstrap
fdisk /dev/sdb
o
n
<return>
<return>
<return>
w