Skip to content

Instantly share code, notes, and snippets.

View vozhyk-'s full-sized avatar

Witaut Bajaryn vozhyk-

View GitHub Profile
@vozhyk-
vozhyk- / relcopy.rb
Created March 18, 2018 19:28
relcp - copies files preserving directory structure
#!/usr/bin/env ruby
require 'pathname'
require 'optparse'
$opt = { :cp_args => [],
:mkdir_args => [] }
def cp_one (root1, path, root2)
newdirname = root2 + path.dirname
@vozhyk-
vozhyk- / crash-g-2018-02-17_16-20-58
Created February 17, 2018 17:44
Crash dump from after more processes hung
crash 7.1.3
Copyright (C) 2002-2014 Red Hat, Inc.
Copyright (C) 2004, 2005, 2006, 2010 IBM Corporation
Copyright (C) 1999-2006 Hewlett-Packard Co
Copyright (C) 2005, 2006, 2011, 2012 Fujitsu Limited
Copyright (C) 2006, 2007 VA Linux Systems Japan K.K.
Copyright (C) 2005, 2011 NEC Corporation
Copyright (C) 1999, 2002, 2007 Silicon Graphics, Inc.
Copyright (C) 1999, 2000, 2001, 2002 Mission Critical Linux, Inc.
This program is free software, covered by the GNU General Public License,
@vozhyk-
vozhyk- / log
Created October 6, 2015 18:40
lz4hc-vmcore-test
# zfs set recordsize=1M hts/test
# test() { src="$1"; dest="$2"; algo="$3"; echo " * $algo ..."; zfs set compress="$algo" hts/test; pv -a "$src" > "$dest-$algo"; }
# echo " * recordsize=1M"; for level in 1 4 6 9 12 14 16; do test /files/backups/vmcore-3 /test/vmcore-1M lz4hc-$level; done
* recordsize=1M
* lz4hc-1 ...
[27,7MiB/s]
* lz4hc-4 ...
[27,7MiB/s]
* lz4hc-6 ...
[26,4MiB/s]
@vozhyk-
vozhyk- / README
Last active August 29, 2015 14:25
Firefox eating all the swap, hanging the system for an hour, and getting itself (and probably X) killed
Search for 'volume' or for 'oom'. grep -v fcron also might help with reading.
@vozhyk-
vozhyk- / .gitignore
Last active August 29, 2015 14:18
MEGA API: Streaming download test
# github/gitignore/CMake.gitignore
CMakeCache.txt
CMakeFiles
Makefile
cmake_install.cmake
install_manifest.txt