Skip to content

Instantly share code, notes, and snippets.

View jbub's full-sized avatar

Juraj Bubniak jbub

View GitHub Profile
@jbub
jbub / pgcat.toml
Created May 15, 2023 07:27
pgcat.toml
# General pooler settings
[general]
# What IP to run on, 0.0.0.0 means accessible from everywhere.
host = "0.0.0.0"
# Port to run on, same as PgBouncer used in this example.
port = 6432
# Whether to enable prometheus exporter or not.
enable_prometheus_exporter = true
@jbub
jbub / clean-macports.sh
Created July 8, 2013 21:23
Clean macports temporary build files and remove inactive ports.
# remove all temporary build files
sudo port clean --all installed
# remove all inactive ports
sudo port -f uninstall inactive
@jbub
jbub / pip-list-redundant-pkgs.sh
Created June 12, 2013 08:18
pip list all packages that are installed but not present in the requirements.txt file
pip freeze | grep -v -f requirements.txt
@jbub
jbub / jenkins_export_build_info_json.sh
Created September 8, 2015 09:17
Export git build data as a json and store it inside the build dir.
echo "{\"branch\": \"${GIT_BRANCH#*/}\", \"commit\": \"${GIT_COMMIT}\"}" > "$JENKINS_HOME/jobs/$JOB_NAME/builds/$BUILD_NUMBER/build.json"
@jbub
jbub / squash-commits.sh
Created June 12, 2013 15:31
git squash last two commits into one
git rebase --interactive HEAD~2
# we are going to squash c into b
pick b76d157 b
pick a931ac7 c
# squash c into b
pick b76d157 b
s a931ac7 c
@jbub
jbub / resp.json
Created December 3, 2021 07:27
Fakturoid invoice API response
{
"accepted_at": null,
"attachment": null,
"bank_account": "655664",
"cancelled_at": null,
"client_city": "",
"client_country": "SK",
"client_local_vat_no": "",
"client_name": "Test customer",
"client_registration_no": "",
@jbub
jbub / debian-delete-mail.sh
Created July 5, 2013 09:52
Delete mail messages in debian.
# run mail
mail
# delete single message by its id
d 6
# delete messages using range of ids, from 1 to 20
d 1-20
# you must quit properly in order to delete messages
@jbub
jbub / log.txt
Created March 5, 2019 22:03
Athens minio crash
gc 1 @0.194s 1%: 0.039+9.2+0.88 ms clock, 0.079+5.5/0.47/8.1+1.7 ms cpu, 4->4->1 MB, 5 MB goal, 2 P
gc 2 @0.515s 1%: 0.014+7.9+0.039 ms clock, 0.029+0.79/1.8/4.9+0.078 ms cpu, 4->4->2 MB, 5 MB goal, 2 P
gc 3 @0.578s 0%: 0.010+2.4+0.032 ms clock, 0.021+0.34/0.011/2.3+0.065 ms cpu, 5->5->2 MB, 6 MB goal, 2 P
gc 4 @0.656s 0%: 0.007+2.3+0.21 ms clock, 0.014+0.13/1.2/1.7+0.43 ms cpu, 5->5->2 MB, 6 MB goal, 2 P
gc 5 @0.678s 0%: 0.008+2.6+0.035 ms clock, 0.017+0.18/0.38/2.0+0.070 ms cpu, 5->5->3 MB, 6 MB goal, 2 P
buffalo: Unless you set SESSION_SECRET env variable, your session storage is not protected!
time="2019-03-05T21:57:51Z" level=info msg="Exporter not specified. Traces won't be exported"
buffalo: Starting application at :3009
gc 6 @42.566s 0%: 3.3+6.9+0.039 ms clock, 6.6+0.24/3.9/0+0.078 ms cpu, 6->6->3 MB, 7 MB goal, 2 P
gc 7 @44.055s 0%: 0.010+15+0.043 ms clock, 0.020+0.11/7.7/10+0.086 ms cpu, 580->580->580 MB, 581 MB goal, 2 P
data:
count: 100
format:
name: csv
options:
delimiter: ";"
fields:
- name: id
resolver: ctx_index
- name: cookie
@jbub
jbub / gist:1900e74fb2625506fcd5cde5f3d669cd
Created November 4, 2017 17:23
Gitea 1.2.3 push fail
Counting objects: 8, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (8/8), done.
Writing objects: 100% (8/8), 785 bytes | 785.00 KiB/s, done.
Total 8 (delta 4), reused 0 (delta 0)
Gitea: Internal error
UpdatePublicKey: Failed to update public key: EOF
To ssh://my.repo.com:1234/my/repo.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'ssh://git@my.repo.com:1234/my/repo.git'