This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Example ~/.ssh/config | |
# Used with something like: | |
# sshfs -o rw,reconnect,auto_unmount,noatime,idmap=user,allow_root _sshfs.syra.dlitz.net:~/ ~/mnt/syra | |
Host _sshfs.syra.dlitz.net | |
HostKeyAlias syra.dlitz.net | |
HostName syra.dlitz.net | |
ProxyCommand none | |
ControlPath none | |
ServerAliveCountMax 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ~/.bashrc: executed by bash(1) for non-login shells. | |
# Note: PS1 and umask are already set in /etc/profile. You should not | |
# need this unless you want different defaults for root. | |
# PS1='${debian_chroot:+($debian_chroot)}\h:\w\$ ' | |
# umask 022 | |
# You may uncomment the following lines if you want `ls' to be colorized: | |
export LS_OPTIONS='--color=auto' | |
eval "$(dircolors)" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# dlitz 2022 | |
# SPDX-License-Identifier: CC0-1.0 | |
set -eu | |
usage() { | |
echo "usage: $0 [-v] inputfile.djvu output-dir" | |
echo "Split a DjVu document into multiple pages, one per file." | |
echo "Use djvm -c to reassemble the file." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# sort | uniq -c | sort -rn in Python | |
# Released into the public domain. No rights reserved. | |
import sys | |
# Build a dictionary of lines and their associated counts. | |
counts = {} | |
#input_file = open("/path/to/file", "r") | |
input_file = sys.stdin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# dlitz 2022 | |
# This tests 'btrfstune -m' (change metadata_uuid) followed by 'btrfs scrub'. | |
# Apparently, changing the metadata_uuid causes btrfs scrub to spew | |
# uncorrectable errors, even on an empty filesystem. | |
# Changing the metadata_uuid back to the old value makes 'btrfs scrub' happy | |
# again. | |
set -eu |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
echo "Hello world!" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Inspired by the vmware-any-any-update series of patches | |
set -e | |
ws_ver=`vmware-installer -l | grep vmware-workstation | awk '{ print $2 }' | cut -d. -f1-3` | |
if [ -z "$ws_ver" ] ; then | |
echo >&2 "$0: error: VMware Workstation not installed?" | |
exit 1 | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/lib/travis/github/services/fetch_config.rb b/lib/travis/github/services/fetch_config.rb | |
index 6d61dd7..542cd0a 100644 | |
--- a/lib/travis/github/services/fetch_config.rb | |
+++ b/lib/travis/github/services/fetch_config.rb | |
@@ -11,7 +11,8 @@ module Travis | |
register :github_fetch_config | |
def run | |
- config = retrying(3) { parse(fetch) } | |
+ config = retrying(3) { parse(fetch(config_url)) } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Extracted from Rails 2.3.10's active_record/schema_dumper.rb, with our patch applied. | |
# Put this into rakelib/rails_bug_1210_schemadumper_monkeypatch.rake in your Rails project | |
# see https://rails.lighthouseapp.com/projects/8994/tickets/1210-table_name_prefix-with-dbschemaload-causes-double-prefixes#ticket-1210-9 | |
#-- | |
# Copyright (c) 2004-2010 David Heinemeier Hansson | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining | |
# a copy of this software and associated documentation files (the | |
# "Software"), to deal in the Software without restriction, including | |
# without limitation the rights to use, copy, modify, merge, publish, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RTEST(value) returns true if the value is implicitly true | |
./ruby.h: | |
#define RTEST(v) (((VALUE)(v) & ~Qnil) != 0) | |
... | |
#define Qfalse ((VALUE)0) | |
#define Qtrue ((VALUE)2) | |
#define Qnil ((VALUE)4) |
NewerOlder