Skip to content

Instantly share code, notes, and snippets.

View drfill's full-sized avatar

Fill Quazy drfill

  • NJoyX
  • Riga, Latvia
View GitHub Profile
@drfill
drfill / renew-gpgkey.md
Created July 18, 2022 09:04 — forked from krisleech/renew-gpgkey.md
Renew Expired GPG key

Renew GPG key

Given that your key has expired.

$ gpg --list-keys
$ gpg --edit-key KEYID

Use the expire command to set a new expire date:

@drfill
drfill / com.rabbitmq.plist
Created October 9, 2018 17:41 — forked from chmurph2/com.rabbitmq.plist
I created this plist in ~/Library/LaunchAgents after install RabbitMQ via Homebrew.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.rabbitmq</string>
<key>Program</key>
<string>/usr/local/sbin/rabbitmq-server</string>
<key>RunAtLoad</key>
@drfill
drfill / multiple_mocks.py
Created August 16, 2018 15:38 — forked from msabramo/multiple_mocks.py
A Python context manager for doing multiple mock.patches
@contextlib.contextmanager
def multiple_mocks(mock_specs):
"""
`mock_specs` is a dict of mock target name => mock patch kwargs
Example usage:
with multiple_mocks(
{'os.path.exists': {'side_effect': mock_path_exists},
'subprocess.Popen': {},
@drfill
drfill / bulk.sh
Last active July 6, 2018 18:06 — forked from bdrewery/bulk.sh
Hook to upload packages to S3 after bulk is successful.
#! /bin/sh
#
# Copyright (c) 2013-2014 Bryan Drewery <bdrewery@FreeBSD.org>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
@drfill
drfill / Postman.desktop
Created April 12, 2018 19:10 — forked from aviskase/Postman.desktop
Install Postman
[Desktop Entry]
Encoding=UTF-8
Name=Postman
Exec=postman
Icon=/opt/Postman/resources/app/assets/icon.png
Terminal=false
Type=Application
Categories=Development;
@drfill
drfill / onlinenet_debian_ipv6.md
Created February 27, 2018 14:57 — forked from eraserewind/onlinenet_debian_ipv6.md
Online.net: IPv6 in Debian virtual machines

Online.net: IPv6 in Debian virtual machines

Without this annoying dribbler thing.

Variables

  • RANGE = /64
  • EXT_IF = external interface
  • IPV6 = Any IPv6 in RANGE
  • DUID = dhcp client id. Find it in console.online.net
# basic pfctl control
# ==
# Related: http://www.OpenBSD.org
# Last update: Tue Dec 28, 2004
# ==
# Note:
# this document is only provided as a basic overview
# for some common pfctl commands and is by no means
# a replacement for the pfctl and pf manual pages.
@drfill
drfill / consul.service
Created February 13, 2018 19:01 — forked from Manc/consul.service
/etc/systemd/system/consul.service
[Unit]
Description=Consul service discovery agent
Requires=network-online.target
After=network.target
[Service]
User=consul
Group=consul
PIDFile=/run/consul/consul.pid
Restart=on-failure
@drfill
drfill / freebsd-bluetooth-mouse.txt
Created February 1, 2018 10:20
Configure FreeBSD Bluetooth Mouse
Add to /boot/loader.conf:
ng_ubt_load="YES"
Add to /etc/rc.conf:
hcsecd_enable="YES"
sdpd_enable="YES"
bthidd_enable="YES"
Reboot, or run:
@drfill
drfill / gist:c18308b6d71ee8032efda870b9be348e
Created October 26, 2017 17:58 — forked from Mindgames/gist:556dc7d1e452d0cefcb7
Amazon S3 download with Curl
#!/bin/sh
file=path/to/file
bucket=your-bucket
resource="/${bucket}/${file}"
contentType="application/x-compressed-tar"
dateValue="`date +'%a, %d %b %Y %H:%M:%S %z'`"
stringToSign="GET
${contentType}
${dateValue}
${resource}"