Skip to content

Instantly share code, notes, and snippets.

View acosonic's full-sized avatar
💭
I may be slow to respond.

Aleksandar Pavić acosonic

💭
I may be slow to respond.
View GitHub Profile
@acosonic
acosonic / decrap.sh
Last active October 12, 2023 10:33
Ubuntu decrapifier
#!/bin/bash
#this script is intended to decrapify your Ubuntu, stuff like turn off unattended upgrades...
echo 'some of this should be done as root'
echo 'Fix keyboard shortcuts'
gsettings set org.gnome.desktop.input-sources xkb-options [] #remove left ctrl shift
gsettings set org.gnome.mutter overlay-key 'Super_L'
gsettings set org.gnome.Terminal.Legacy.Keybindings:/org/gnome/terminal/legacy/keybindings/ new-tab '<Control><Shift>t'
@probonopd
probonopd / Wayland.md
Last active May 11, 2024 06:40
Think twice about Wayland. It breaks everything!

Think twice before abandoning Xorg. Wayland breaks everything!

Hence, if you are interested in existing applications to "just work" without the need for adjustments, then you may be better off avoiding Wayland.

Wayland solves no issues I have but breaks almost everything I need. Even the most basic, most simple things (like xkill) - in this case with no obvious replacement. And usually it stays broken, because the Wayland folks mostly seem to care about Automotive, Gnome, maybe KDE - and alienating everyone else (e.g., people using just an X11 window manager or something like GNUstep) in the process.

Wayland proponents make it seem like Wayland is "the successor" of Xorg, when in fact it is not. It is merely an incompatible alternative, and not even one that has (nor wants to have) feature parity (missing features). And unlike X11 (the X Window System), Wayland protocol designers actively avoid the concept of "windows" (making up incompr

@TranKovak
TranKovak / pfx2pem.md
Last active December 15, 2020 12:46
Convert pfx file to pem file #pfx #pem #cert

Conversion to a combined PEM file

To convert a PFX file to a PEM file that contains both the certificate and private key, the following command needs to be used:

# openssl pkcs12 -in filename.pfx -out cert.pem -nodes

Conversion to separate PEM files

We can extract the private key form a PFX to a PEM file with this command:

@cweinberger
cweinberger / mysql-drop-all-tables.sh
Created June 6, 2018 12:44
drops all tables of a specific db
#!/bin/bash
#usage: mysql-drop-all-tables -d database -u dbuser -p dbpass
TEMP_FILE_PATH='./drop_all_tables.sql'
while getopts d:u:p: option
do
case "${option}"
in
@sublimino
sublimino / gist:a854b3bf9ac1cb94f640cd966c987f69
Last active July 13, 2022 13:50
tmux, terminator, and copyq

This has caused a not-inconsiderable amount of trouble! But finally, I've fixed copypasta:

Terminator

  1. enable global -> smart copy (only affects mapping of ctl-c if text selected)
  2. Disable profile -> copy on selection

copyq

  1. store clipboard
  2. store text using mouse
  3. ^^paste clipboard with mouse^^
@lmcneel
lmcneel / remove-node-modules.md
Last active April 21, 2024 19:39
How to remove node_modules after they have been added to a repo

How to remove node_modules

Create a .gitignore file

  1. Check for an existing .gitignore file in the project directory
ls -a
@acosonic
acosonic / disk_speed.txt
Last active August 19, 2022 09:04
Testing of diskspeed at various hosting companies on idle machines
Command used for testing:
dd if=/dev/zero of=sb-io-test bs=1M count=1k conv=fdatasync && rm sb-io-test
Results sorted by best->top / worst->bottom
Herzner (1 cpu cloud machine)
1073741824 bytes (1.1 GB, 1.0 GiB) copied, 1.23958 s, 866 MB/s
OVH Dedicated VmWare nVME
1073741824 bytes (1.1 GB, 1.0 GiB) copied, 1.24378 s, 863 MB/s
@ipbastola
ipbastola / clean-up-boot-partition-ubuntu.md
Last active May 2, 2024 01:27
Safest way to clean up boot partition - Ubuntu 14.04LTS-x64, Ubuntu 16.04LTS-x64

Safest way to clean up boot partition - Ubuntu 14.04LTS-x64, Ubuntu 16.04LTS-x64

Reference

Case I: if /boot is not 100% full and apt is working

1. Check the current kernel version

$ uname -r 
@ioistired
ioistired / jsfuckhello.js
Created February 21, 2015 05:03
JSFuck Hello World
[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]][([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]+(!![]+[])[+[]]+(![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+
@klepsydra
klepsydra / sync-fail2ban.sh
Last active January 11, 2024 15:11
Block globally reported hack attempts using your local iptables firewall rules
#!/bin/bash
## Update fail2ban iptables with globally known attackers.
## Actually, runs 100% independently now, without needing fail2ban installed.
##
## /etc/cron.daily/sync-fail2ban
##
## Author: Marcos Kobylecki <fail2ban.globalBlackList@askmarcos.com>
## http://www.reddit.com/r/linux/comments/2nvzur/shared_blacklists_from_fail2ban/