Skip to content

Instantly share code, notes, and snippets.

@hacklschorsch
hacklschorsch / gist:16fbbf63a902b75e9112a4a7d0bfe29e
Created January 14, 2025 00:01
Tahoe log starting up and shutting down again
2025-01-13T23:50:18+0000 [twisted.scripts._twistd_unix.UnixAppLogger#info] twistd 24.7.0 (/nix/store/fpjwp47y9w44i2fx01dq9ywv3xhqsm9y-python3-tahoe-lafs/bin/python3.12 3.12.7) starting up.
2025-01-13T23:50:18+0000 [twisted.scripts._twistd_unix.UnixAppLogger#info] reactor class: twisted.internet.epollreactor.EPollReactor.
2025-01-13T23:50:34+0000 [-] Unable to write to plugin cache /nix/store/fpjwp47y9w44i2fx01dq9ywv3xhqsm9y-python3-tahoe-lafs/lib/python3.12/site-packages/twisted/plugins/dropin.cache: error number 30
2025-01-13T23:50:34+0000 [-] Foolscap logging initialized
2025-01-13T23:50:34+0000 [-] Note to developers: twistd.log does not receive very much.
2025-01-13T23:50:34+0000 [-] Use 'flogtool tail -c NODEDIR/private/logport.furl' instead
2025-01-13T23:50:34+0000 [-] and read docs/logging.rst
2025-01-13T23:50:34+0000 [-] Unable to write to plugin cache /nix/store/fpjwp47y9w44i2fx01dq9ywv3xhqsm9y-python3-tahoe-lafs/lib/python3.12/site-packages/twisted/plugins/dropin.cache: error number 30
2025-01-13T23
@hacklschorsch
hacklschorsch / Lightweight-Design-Template.md
Created December 20, 2024 01:10
Lightweight Design Template

Lightweight Design: Subject

The goal here is to do the minimum amount of design we can get away with while still making a quality product. Think of this as a tool to help define the problem, analyze solutions and share results. Feel free to skip sections that you don’t think are relevant (but say that you are doing so). Delete the bits in italics.

Contacts: The primary contacts for this spec.
Date: YYYY-MM-DD

Short description of feature. Consider clarifying by describing what it is not.

Rationale

@hacklschorsch
hacklschorsch / FileChangeNotifier.java
Last active July 15, 2019 22:12
Java observable that notifies on changes to a File using Java 7 NIO and a separate thread.
import java.io.Closeable;
import java.io.File;
import java.io.IOException;
import java.nio.file.*;
import java.util.Observable;
import static java.nio.file.StandardWatchEventKinds.*;
/**
* FileChangeNotifier notifies its observers when @file has changed.
* It uses Java 7 NIO and runs in a separate thread (since the NIO call blocks).
@hacklschorsch
hacklschorsch / gist:1a1d81e61465e5414864
Created September 29, 2014 15:00
Textsecure "database disk image is malformed" crash stack trace
E/AndroidRuntime( 2108): FATAL EXCEPTION: main
E/AndroidRuntime( 2108): android.database.sqlite.SQLiteDatabaseCorruptException: database disk image is malformed
E/AndroidRuntime( 2108): at android.database.sqlite.SQLiteQuery.native_fill_window(Native Method)
E/AndroidRuntime( 2108): at android.database.sqlite.SQLiteQuery.fillWindow(SQLiteQuery.java:73)
E/AndroidRuntime( 2108): at android.database.sqlite.SQLiteCursor.fillWindow(SQLiteCursor.java:287)
E/AndroidRuntime( 2108): at android.database.sqlite.SQLiteCursor.getCount(SQLiteCursor.java:268)
E/AndroidRuntime( 2108): at android.widget.CursorAdapter.getCount(CursorAdapter.java:132)
E/AndroidRuntime( 2108): at android.widget.HeaderViewListAdapter.getCount(HeaderViewListAdapter.java:132)
E/AndroidRuntime( 2108): at android.widget.AdapterView$AdapterDataSetObserver.onChanged(AdapterView.java:778)
E/AndroidRuntime( 2108): at android.database.DataSetObservable.notifyChanged(DataSetObservable.java:31)
@hacklschorsch
hacklschorsch / gist:4109767
Created November 19, 2012 09:15
Example "run" file for Multilog
#!/bin/sh
exec multilog t s999999 n20 ./main
@hacklschorsch
hacklschorsch / gist:4109761
Created November 19, 2012 09:12
Add configuration to Daemontools Node.js/Meteor Config Directory
echo "mongodb://localhost/meteor" > service/nodejs/env/MONGO_URL
echo "3000" > service/nodejs/env/PORT
echo "http://meteordeployment.staging.itagenten.de" > service/nodejs/env/ROOT_URL
@hacklschorsch
hacklschorsch / gist:4109730
Created November 19, 2012 09:09
Daemontools 'run' file for Meteor/NodeJS
#!/bin/sh
echo Starting Node.js
exec 2>&1
exec envdir ./env node ../../bundle/main.js
@hacklschorsch
hacklschorsch / forever_0.10.0_deps
Created October 12, 2012 10:35
Forever 0.10.0's crazy list of dependencies when installing (ignore 304s, but still. Also looks like npm outputs the GETs to fd 2.)
fs@itagent-mws3%pts/2 (12:27) ~ > npm --no-color install -g forever | grep GET
zsh: correct 'forever' to '.forever' [nyae]? n
npm http GET https://registry.npmjs.org/forever
npm http 304 https://registry.npmjs.org/forever
npm http GET https://registry.npmjs.org/cliff/0.1.8
npm http GET https://registry.npmjs.org/flatiron/0.2.3
npm http GET https://registry.npmjs.org/forever-monitor/1.0.1
npm http GET https://registry.npmjs.org/nconf/0.6.1
npm http GET https://registry.npmjs.org/nssocket/0.3.8
npm http GET https://registry.npmjs.org/optimist/0.3.4
@hacklschorsch
hacklschorsch / gist:2788752
Created May 25, 2012 15:22
GIT Hook-Chaining script
#!/bin/bash
#
# Author: orefalo
# @see http://stackoverflow.com/questions/8730514/chaining-git-hooks#8734391
#
# Changes:
# [email protected]: Add [0-9] to file glob to exclude .sample files
#
# Usage:
#
@hacklschorsch
hacklschorsch / gist:2788656
Created May 25, 2012 15:08 — forked from founddrama/gist:1013614
a jshint pre-commit hook for git
#!/bin/bash
# A pre-commit hook for git to lint JavaScript files with jshint
# @see https://github.com/jshint/jshint/
#
# @see http://blog.founddrama.net/2011/06/jshint-pre-commit-hook-for-git
# @see https://gist.github.com/1013614
#
# Modified by [email protected] 2012-05-22 for node.js and explicit /bin/bash
if git rev-parse --verify HEAD >/dev/null 2>&1