##################################################################################################################
# openssl req -new -newkey rsa:2048 -sha256 -days 365 -nodes -x509 -extensions v3_ca -keyout squid-ca-key.pem -out squid-ca-cert.pem
# cat squid-ca-cert.pem squid-ca-key.pem >> squid-ca-cert-key.pem
# sudo mkdir /etc/squid/certs
# sudo mv squid-ca-cert-key.pem /etc/squid/certs/
# sudo chown proxy:proxy -R /etc/squid/certs
# sudo /usr/lib/squid/security_file_certgen -c -s /var/cache/squid/ssl_db -M16MB
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import sqlite3 | |
import time | |
from bs4 import BeautifulSoup | |
ids = set() | |
user = os.environ['USERPROFILE'].replace("\\", "/") | |
adr = u"file:" + user + u"/AppData/Local/Microsoft/Windows/Notifications/wpndatabase.db?mode=ro" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# A small POSIX compliant script to toggle between dark and light variant | |
# of a theme for GNOME based desktops. | |
# Copyright (C) 2021 Rifaz Nahiyan | |
# This code is licensed under the MIT License. | |
# View the license in its entirety at: https://opensource.org/licenses/MIT | |
get_current_theme () { |
I bought M1 MacBook Air. It is the fastest computer I have, and I have been a GNOME/GNU/Linux user for long time. It is obvious conclusion that I need practical Linux desktop environment on Apple Silicon.
Fortunately, Linux already works on Apple Silicon/M1. But how practical is it?
- Two native ports exist.
Reference (microsoft/vscode#31168)
find /usr/share/ -name "product.json"
# cd into vscodum directory
cd /usr/share/vscodium-bin/resources/app
nano product.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
org.gnome.desktop.wm.keybindings switch-group ['<Super>Above_Tab', '<Alt>Above_Tab'] | |
org.gnome.desktop.wm.keybindings begin-resize ['<Alt>F8'] | |
org.gnome.desktop.wm.keybindings switch-to-workspace-7 [] | |
org.gnome.desktop.wm.keybindings begin-move ['<Alt>F7'] | |
org.gnome.desktop.wm.keybindings move-to-side-w [] | |
org.gnome.desktop.wm.keybindings move-to-corner-nw [] | |
org.gnome.desktop.wm.keybindings move-to-workspace-10 [] | |
org.gnome.desktop.wm.keybindings move-to-workspace-6 [] | |
org.gnome.desktop.wm.keybindings move-to-workspace-right ['<Control><Shift><Alt>Right'] | |
org.gnome.desktop.wm.keybindings always-on-top [] |
NOTE: If you have Windows 11 there is now an official way to do this in WSL 2, use it if possible - see MS post here (WINDOWS 11 ONLY)
This guide will enable systemd
to run as normal under WSL 2. This will enable services like microk8s
, docker
and many more to just work
during a WSL session. Note: this was tested on Windows 10 Build 2004, running Ubuntu 20.04 LTS in WSL 2.
-
To enable
systemd
under WSL we require a tool calledsystemd-genie
-
Copy the contents of
install-sg.sh
to a new file/tmp/install-sg.sh
:
- Download font.
mkdir ~/.local/share/fonts/
wget https://github.com/samuelngs/apple-emoji-linux/releases/latest/download/AppleColorEmoji.ttf -O ~/.local/share/fonts/AppleColorEmoji.ttf
# or system-wide to /usr/share/fonts/AppleColorEmoji/, for example
- Put Apple Color Emoji on the 1st place in
/etc/fonts/conf.d/60-generic.conf
:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- MS Teams on Linux doesn't show the window decorations, let's fix that | |
-- drop this in your devilspie2 folder, typically ~/.config/devilspie2 and start devilspie2 | |
if string.match(get_window_name(), "Microsoft Teams") then | |
decorate_window(); | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. | |
; #Warn ; Enable warnings to assist with detecting common errors. | |
SendMode Input ; Recommended for new scripts due to its superior speed and reliability. | |
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory. | |
F12::ToggleTerminal() | |
ShowAndPositionTerminal() | |
{ | |
WinShow ahk_class CASCADIA_HOSTING_WINDOW_CLASS |
NewerOlder