Skip to content

Instantly share code, notes, and snippets.

@phackwer
phackwer / RectangleConfig.json
Created November 17, 2023 16:54
My rectangle setup to get Windows like window+moves shortcuts
{
"bundleId" : "com.knollsoft.Rectangle",
"defaults" : {
"allowAnyShortcut" : {
"bool" : false
},
"almostMaximizeHeight" : {
"float" : 0
},
"almostMaximizeWidth" : {
@phackwer
phackwer / README-convert-properties-to-json-using-jq.md
Created August 23, 2022 09:37 — forked from drmalex07/README-convert-properties-to-json-using-jq.md
Convert properties to JSON using jq. #properties $json #jq

README

Say we have a properties file at foo.properties.

First, clean-up whitespace and empty lines, store in foo-1.properties:

cat foo.properties | \
    sed 's/[[:space:]]*=[[:space:]]*/=/' | \
    sed 's/[[:space:]]*$//' | \

sed '/^$/d' > foo-1.properties

1. Create a new directory;
mkdir Apple\ Enterprise
cd Apple\ Enterprise
2. Generate a certificate signing request
openssl req -nodes -newkey rsa:2048 -keyout ios_enterprise.key -out CertificateSigningRequest.certSigningRequest
Note: If you want to password-protect the .pem key, ditch the -nodes switch on step 2:
openssl req -newkey rsa:2048 -keyout ios_enterprise.key -out CertificateSigningRequest.certSigningRequest
@phackwer
phackwer / touchpad-fix
Created December 5, 2021 01:12 — forked from v-dimitrov/touchpad-fix
touchpad fn key fix
#!/bin/sh
# toggle touch pad
device=`xinput list --name-only | grep -i touchpad`
isOn=`xinput list-props "$device" | grep -i enabled | tail -c 2`
iconEnabled='input-touchpad-symbolic'
iconDisabled='touchpad-disabled-symbolic'
case "$isOn" in
0)
Get the required packages before trying to install it:
apt-get install build-essential
apt-get install dkms
apt-get install linux-generic
apt-get install linux-signed-generic
Download driver at https://www.displaylink.com/downloads/file?id=1304, unzip it, chmod 777 and install as root
Now, to make sure it will not fail:
In Ubuntu 16.04 LTS, after the initial install with
sudo apt install virtualbox virtualbox-guest-additions-iso virtualbox-ext-pack
I also had to:
sudo usermod -a -G vboxusers $USER
Then I could enable USB 2/3 support in the machine settings.
sudo gedit /etc/systemd/system/rc-local.service
Then add the following content to it.
[Unit]
Description=/etc/rc.local Compatibility
ConditionPathExists=/etc/rc.local
[Service]
Type=forking
ExecStart=/etc/rc.local start
@phackwer
phackwer / gist:5207d76b189794d68fe37401d046b742
Last active February 13, 2020 14:52
Scroll on non-scrollwheel devices
Just install mouseemu by:
sudo apt-get install mouseemu
and edit "/etc/default/mouseemu" and add the line:
SCROLL="-scroll 56"
126 is the key scan code for the right super key. you can find other key codes by using showkey in the terminal. now restart mouseemu:
@phackwer
phackwer / gist:07d3da53aa33231ed4905c62d0dbee67
Created January 10, 2020 11:54
Show / Find cursor on Linux
gsettings set org.gnome.settings-daemon.peripherals.mouse locate-pointer true
@phackwer
phackwer / gist:ef2819332f9c5a1d7572c7ada1e68b89
Last active November 29, 2021 15:44
SonarQube on Docker and local scanner
# SONAR QUBE SERVER RUN
docker run -d --rm \
-p 9000:9000 \
-p 9092:9092 \
-v sonarqube_conf:/opt/sonarqube/conf \
-v sonarqube_extensions:/opt/sonarqube/extensions \
-v sonarqube_logs:/opt/sonarqube/logs \
-v sonarqube_data:/opt/sonarqube/data \
--name sonarqube \