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
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 |
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/python3 | |
import sys | |
import requests | |
def translate(string, from_language="auto", to_language="auto"): | |
headers = {"User-Agent":"Mozilla/4.0 (compatible; MSIE 6.0; \ | |
Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; \ |
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 <jdthood@yahoo.co.uk> | |
# 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
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
# 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
#!/usr/bin/env python | |
from idlelib.PyShell import main | |
if __name__ == '__main__': | |
main() | |
NewerOlder