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
#!/usr/bin/env bash | |
OBJECT_PATH=/org/freedesktop/login1/session/$XDG_SESSION_ID | |
BUS_NAME=org.freedesktop.login1 | |
UNLOCK="$OBJECT_PATH: $BUS_NAME.Session.Unlock ()" | |
GDBUS_MONITOR="gdbus monitor --system --dest $BUS_NAME --object-path $OBJECT_PATH" | |
function log { |
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 re | |
import json | |
import matplotlib.pyplot as plt | |
j_file = open('/home/dmgl/Downloads/Telegram Desktop/ChatExport_2020-09-04/result.json', 'r') | |
j = json.load(j_file) | |
s_type = {'type': 'hashtag', 'text': '#scores'} |
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
var links,thisLink; | |
var myCsv; | |
links = document.getElementsByClassName('audio_row_content _audio_row_content'); | |
for (let item of links) { | |
title = item.getElementsByClassName('audio_row__title_inner _audio_row__title_inner').item(0).innerText | |
performer = item.getElementsByClassName('audio_row__performers').item(0).innerText | |
console.log(performer + " - " + title) |
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
#!/usr/bin/env python3 | |
import subprocess | |
from pynput import keyboard | |
# Switch layout - Disable | |
# Compose key - Disable | |
# ⌘ key behavior - Shortcut Overlay | |
# Caps Lock bevahior - Disable |
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
#!/usr/bin/env bash | |
# | |
# Parses DHCP options from openvpn to update resolv.conf | |
# To use set as 'up' and 'down' script in your openvpn *.conf: | |
# up /etc/openvpn/update-resolv-conf | |
# down /etc/openvpn/update-resolv-conf | |
# | |
# Used snippets of resolvconf script by Thomas Hood <[email protected]> | |
# and Chris Hanson | |
# Licensed under the GNU GPL. See /usr/share/common-licenses/GPL. |
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
# Create a bare repository on the server side. | |
cd ~/Projects; sudo -u pi mkdir -m 770 project.git | |
cd project.git; sudo -u pi git --bare init --shared=group | |
# From client side the developer’s project must be pushed into the new bare server repository: | |
# First, create a new local git repository and add all files within this folder. | |
cd dir_with_files; git init; git add .; git commit -m "creation repo" | |
git remote add origin ssh://pi@address:port/home/pi/Projects/project.git | |
# Check origin |
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
default partial alphanumeric_keys modifier_keys | |
xkb_symbols "pc105" { | |
key <ESC> { [ Escape ] }; | |
// The extra key on many European keyboards: | |
key <LSGT> { [ less, greater, bar, brokenbar ] }; | |
// The following keys are common to all layouts. | |
key <BKSL> { [ backslash, bar ] }; |
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
#!/usr/bin/env python | |
# save this file and run `python how_referer_header_works.py` | |
# to stop you can use commnad `lsof -i tcp:9999` and kill pid | |
# usage: make public post on any site with hlink href http://0.0.0.0:9999 and click on it | |
# or `curl 0.0.0.0:9999 --referer google.com -H "X-Something: Yeah-yeah-yeah"` | |
# see output of script with headers section (custom referer) |
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
sudo raspi-config # set hostname; ssh, vnc enable; spi enable | |
sudo leafpad /etc/ssh/sshd_config # set port, listen | |
sudo apt-get update && sudo apt-get upgrade | |
sudo apt-get purge bluej scratch greenfoot | |
rm -rf ~/oldconffiles/ ~/oldconffiles/Scratch | |
rm -rf ~/Documents/* | |
sudo dpkg-reconfigure locales |
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
dmgl@metal:~$ ls /usr/share/applications | awk -F '.desktop' ' { print $1}' - | |
4kvideodownloader | |
apport-gtk | |
assistant-qt5 | |
bamf-2.index | |
bluetooth-sendto | |
ca.desrt.dconf-editor | |
catfish | |
cheese |
NewerOlder