Skip to content

Instantly share code, notes, and snippets.

View doxavore's full-sized avatar

Doug Mayer doxavore

View GitHub Profile
@doxavore
doxavore / using-google-takeout.md
Created February 13, 2022 20:54 — forked from chabala/using-google-takeout.md
Merge and extract tgz files from Google Takeout

Recently found some clowny gist was the top result for 'google takeout multiple tgz', where it was using two bash scripts to extract all the tgz files and then merge them together. Don't do that. Use brace expansion, cat the TGZs, and extract:

$ cat takeout-20201023T123551Z-{001..011}.tgz | tar xzivf -

You don't even need to use brace expansion. Globbing will order the files numerically:

$ cat takeout-20201023T123551Z-*.tgz | tar xzivf -
-----BEGIN PGP PUBLIC KEY BLOCK-----
mQINBFyb5j4BEADG9vEWQO7AragedbBW/J9+voMpqsFQVmGEOjXBUcvJhh5SvRiX
Cdpgp9ubTjGgjn06r0D3/Vu3Zx1y0LLMd7HjK9YTaBBD3c5vBWkLFOUr4vlu24DM
hWbOK3GxdaZ+QAEcR+oy9aM4Lb9cdpZykE7/Y6Zu98lwbYnUJqLAaBLVnSX6JYPJ
rdA0bGwU7skv3r0HGawAls6CKhWxLRX52LRRPhHHaws0ZdGIDvZfrjkB38PefWJu
CKe79Ykxst2ARip53rzLjrT7+Lko31L0afFI8Wf11FgfO/4paly8kp4WqarGqJY9
qdPdj+Ty7BLjtulGm4frUbMG8tlBLPFg8OM5l1wObSCDJ2fd38GmijS2ZIto3mr3
8qb6BmF2x2l6kzofVPCK0GDnij+ohlTLBzvQUzPQtCj4hVJnAamDmrPtm9OoFbal
ZY4Zi6J6BYy//ATYHyMUpfD/kZMhMYp3AT65MDmlyHSZGSG2zi8Hk5iN1iRX8dPh

Keybase proof

I hereby claim:

  • I am doxavore on github.
  • I am doxavore (https://keybase.io/doxavore) on keybase.
  • I have a public key ASDlK-KxFeOel3yPAYno_OKpFZNYRVa_oHFcVL5r07JIYwo

To claim this, I am signing this object:

@doxavore
doxavore / cmd
Last active August 29, 2015 14:15
doug@swift1-01:/etc/swift$ env|grep ST_
ST_AUTH=http://127.0.0.1:8080/auth/v1.0
ST_USER=test:tester3
ST_KEY=testing3
@doxavore
doxavore / designer.html
Created September 10, 2014 02:59
designer
<link rel="import" href="../core-scaffold/core-scaffold.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<link rel="import" href="../core-menu/core-menu.html">
<link rel="import" href="../core-item/core-item.html">
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-menu/core-submenu.html">
<polymer-element name="my-element">
#!/bin/bash
#
# testflightapp.com tokens
API_TOKEN="YOUR_API_TOKEN"
TEAM_TOKEN="YOUR_TEAM_TOKEN"
PRODUCT_NAME="RowMotion"
ARTEFACTS="$PWD/Artefacts"
Index: orig/ext/readline/readline.c
===================================================================
--- orig/ext/readline/readline.c (revision 45224)
+++ fixed/ext/readline/readline.c (revision 45225)
@@ -1974,7 +1974,7 @@
rl_attempted_completion_function = readline_attempted_completion_function;
#if defined(HAVE_RL_PRE_INPUT_HOOK)
- rl_pre_input_hook = (Function *)readline_pre_input_hook;
+ rl_pre_input_hook = (rl_hook_func_t *)readline_pre_input_hook;
GPL Ghostscript 9.14 (2014-03-26)
Copyright (C) 2014 Artifex Software, Inc. All rights reserved.
Usage: gs [switches] [file1.ps file2.ps ...]
Most frequently used switches: (you can use # in place of =)
-dNOPAUSE no pause after page | -q `quiet', fewer messages
-g<width>x<height> page size in pixels | -r<res> pixels/inch resolution
-sDEVICE=<devname> select device | -dBATCH exit after last file
-sOutputFile=<file> select output file: - for stdout, |command for pipe,
embed %d or %ld for page #
Input formats: PostScript PostScriptLevel1 PostScriptLevel2 PostScriptLevel3 PDF
@doxavore
doxavore / jruby_timeout_process.rb
Created January 17, 2014 19:12
JRuby (tested on 1.7.4 and 1.7.9) exits after 10 seconds. MRI exits after 5 seconds.
require 'timeout'
puts "Starting at #{Time.now}"
begin
Timeout.timeout(5) do
`sleep 10`
puts 'after sleep'
end
rescue Timeout::Error
puts 'timed out'
@doxavore
doxavore / timers_test.rb
Last active January 2, 2016 10:09
Timers 2.0.0 on JRuby 1.7.4
>> require 'timers'
true
>> timers = Timers.new
#<Timers:0x322114c1 @interval=#<Hitimes::Interval:0x19d9a49d>, @timers=#<SortedSet: {}>, @paused_timers=#<SortedSet: {}>>
>> timer = timers.after(5) { puts 'hello' }
#<Timers::Timer:81e fires in 4.995706082 seconds>
# ... never fires
# Also, this doesn't seem to work, from the specs: