Skip to content

Instantly share code, notes, and snippets.

View zregvart's full-sized avatar
🙉
Working, probably

Zoran Regvart zregvart

🙉
Working, probably
  • Zagreb, Croatia
  • 08:32 (UTC +02:00)
View GitHub Profile
@lrvick
lrvick / sigv2.md
Last active April 11, 2023 06:53
Sig v2 Design
  1. Generate the file:
$ awk 'BEGIN { for(c=0;c<10000000;c++) printf "<p>LOL</p>" }' > 100M.html
$ (for I in `seq 1 100`; do cat 100M.html; done) | pv | gzip -9 > 10G.boomgz
  1. Check it is indeed good:
@andrebrait
andrebrait / keychron_linux.md
Last active April 25, 2024 13:24
Keychron keyboards on Linux + Bluetooth fixes

Here is the best setup (I think so :D) for K-series Keychron keyboards on Linux.

Note: many newer Keychron keyboards use QMK as firmware and most tips here do not apply to them. Maybe the ones related to Bluetooth can be useful, but everything related to Apple's keyboard module (hid_apple) on Linux, won't work. As far as I know, all QMK-based boards use the hid_generic module instead. Examples of QMK-based boards are: Q, Q-Pro, V, K-Pro, etc.

Most of these commands have been tested on Ubuntu 20.04 and should also work on most Debian-based distributions. If a command happens not to work for you, take a look in the comment section.

Make Fn + F-keys work (NOT FOR QMK-BASED BOARDS)

Older Keychron keyboards (those not based on QMK) use the hid_apple driver on Linux, even in the Windows/Android mode, both in Bluetooth and Wired modes.

@jgrumboe
jgrumboe / ocp-efk-multiline.md
Last active April 21, 2021 12:24
Openshift EFK Multiline concat for Java / Springboot apps

Introduction

Openshift 3.11 EFK comes with fluentd-concat plugin and therefore multiline support for stacktrace-merging can be configured as shown below.

Modify config-map logging-fluentd

Open the config-map logging-fluentd in openshift-logging project. In the middle you'll see the label @INGRESS, modify/split it into two labels.

original label @INGRESS:

....
@gsaslis
gsaslis / 3scale_Install.asciidoc
Last active December 18, 2023 19:37
Deploy 3scale API Management on Minishift

Installing 3scale on your Laptop

Pre-requisites

.or your desktop. Or a VM in the cloud. Or wherever it is you want to deploy 3scale to start exploring!
  • ❏ Minishift: 3scale is currently targeted for deployment on openshift, and minishift is the recommended development environment for that.

  • oc command-line tool [optional. you can also use the web-based interface.]

tl;dr

@iocanel
iocanel / mvnnotify
Last active June 6, 2017 12:17
An mvn wrapper that sends a notification when the build is done
#!/bin/bash
# An mvn wrapper that sends a notification when the build is done.
# Just throw it under $HOME/bin and create and alias:
# alias mvn=$HOME/bin/mvnnotify
#
# Requires notify-send or something similar.
MVN=`which mvn --skip-alias`
eval $MVN $*
@drmalex07
drmalex07 / README-oneshot-systemd-service.md
Last active April 26, 2024 09:25
An example with an oneshot service on systemd. #systemd #systemd.service #oneshot

README

Services declared as oneshot are expected to take some action and exit immediatelly (thus, they are not really services, no running processes remain). A common pattern for these type of service is to be defined by a setup and a teardown action.

Let's create a example foo service that when started creates a file, and when stopped it deletes it.

Define setup/teardown actions

Create executable file /opt/foo/setup-foo.sh: