builtin fc -R -I /path/to/history/file1
...
builtin fc -R -I /path/to/history/fileN
# write the loaded history to HISTFILE
builtin fc -W "$HISTFILE"
This document summarizes notes taken while to make the VMWare Tech preview work on Apple M1 Pro, it originated from discussions in hashicorp/vagrant-vmware-desktop#22
First install Rosetta if not already done, this is needed to run x86 code:
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
# fshow - git commit browser (enter for show, ctrl-d for diff, ` toggles sort) | |
fshow() { | |
local out shas sha q k | |
while out=$( | |
git log --graph --color=always \ | |
--format="%C(auto)%h%d %s %C(black)%C(bold)%cr" "$@" | | |
fzf --ansi --multi --no-sort --reverse --query="$q" \ | |
--print-query --expect=ctrl-d --toggle-sort=\`); do | |
q=$(head -1 <<< "$out") | |
k=$(head -2 <<< "$out" | tail -1) |
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
// License: MIT Open Source | |
// Copyright (c) Joe Linoff 2016 | |
// Go code to prompt for password using only standard packages by utilizing syscall.ForkExec() and syscall.Wait4(). | |
// Correctly resets terminal echo after ^C interrupts. | |
package main | |
import ( | |
"bufio" | |
"fmt" | |
"os" |
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
package main | |
import ( | |
"math/rand" | |
"strings" | |
"time" | |
) | |
const ( | |
letterBytes = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!#$^*(){}[]|?%&~.,:;" |
I hereby claim:
- I am pmatseykanets on github.
- I am pmatseykanets (https://keybase.io/pmatseykanets) on keybase.
- I have a public key ASBo0Xyy-gP0W8yc8eBDGLwAH_ZtzRq1daPLPMU3dpp70wo
To claim this, I am signing this object:
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
docker run -dit --rm --restart unless-stopped --env-file /home/user/rdstail/.env --name rdstail rdstail -i dbname papertrail -p logsX.papertrailapp.com:YYYYY --app postgres --hostname rds-dbanme |
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
[Unit] | |
Description=App Name | |
After=network.target | |
[Service] | |
EnvironmentFile=-/usr/local/app/.env | |
ExecStart=/usr/local/app/current/app | |
WorkingDirectory=/usr/local/app/current | |
User=nobody | |
Group=nogroup |
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
<?php | |
$file = Storage::disk('s3')->readStream('bucket/file.csv.gz'); | |
// gzip format ZLIB_ENCODING_GZIP | |
// ['window' => 15 + 16] | |
// auto-detect ZLIB_ENCODING_ANY | |
// ['window' => 15 + 32] | |
// See https://github.com/php/php-src/blob/master/ext/zlib/tests/zlib_filter_inflate2.phpt | |
stream_filter_append($file, 'zlib.inflate', STREAM_FILTER_READ, ['window' => 15 + 32]); |
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
/** | |
Decode a php serialized value to json. This function only supports basic | |
data types: | |
- arrays (will always become a json object) | |
- booleans | |
- integers | |
- floats | |
- strings | |
- NULL |
NewerOlder