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/bash | |
freemem=`cat /proc/meminfo|grep 'MemF'| awk '{print int($2/1024)}'` | |
totalmem=`cat /proc/meminfo|grep 'MemT'| awk '{print int($2/1024)}'` | |
usedmem=`echo $totalmem-$freemem | bc` | |
echo -e " | |
\033[1;34mHi $USER!\033[0;37m | |
\033[0;90m+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ | |
\033[0;90m+ \033[1;94mHostname....: \033[36m$(hostname) | |
\033[0;90m+ \033[1;94mKernel......: \033[36m$(uname -r) |
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 hexchat | |
__module_name__ = 'color ranks' | |
__module_author__ = 'Yama' | |
__module_version__ = '0.1' | |
__module_description__ = 'Make user colors by rank' | |
def mod_colors(word, word_eol, userdata): | |
nickname = hexchat.strip(word[0], len(word[0]), 1) | |
nickname += '\003' |
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
#!python | |
import sys | |
import requests | |
from socket import gethostname | |
from sys import argv | |
link = 'https://api.telegram.org/bot' | |
token = 'BotToken' |
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/python | |
import os | |
from sys import argv | |
import socket | |
from random import randrange | |
import urllib.parse | |
yt_vid_add = {"jsonrpc": "2.0", "method": "Playlist.Add", "params": {"playlistid": 1, "item": {"file": "plugin://plugin.video.youtube/play/?video_id="}}} | |
playlist_clear = {"jsonrpc": "2.0", "method": "Playlist.Clear", "params": {"playlistid": 1}} | |
playlist_play = {"jsonrpc": "2.0", "method": "Player.Open", "params": {"item": {"playlistid": 1, "position": 0}}} |
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/bash | |
mnthdd() { | |
# The full mount-path is put together bei $MOUNTPATH and $DRIVES | |
# In this example it would be /media/ + your parameter | |
MOUNTPATH="/media/" | |
# /etc/fstab | |
## hdd1 | |
#/dev/mapper/hdd1 /media/hdd1 ext4 noauto,defaults 0 0 | |
# |
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/bash | |
KERNEL="/boot/vmlinuz-linux" | |
hibernate() { | |
grep $(uname -r) $KERNEL* > /dev/null | |
if [[ $? == 0 ]]; then | |
echo "Newest kernel is running, hibernating..." | |
systemctl hibernate | |
else | |
echo "New kernel is installed, can't continue after hibernate..." |
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 flask import Flask, request, url_for | |
from werkzeug.contrib.atom import AtomFeed | |
from html.parser import HTMLParser | |
import urllib.request | |
from datetime import datetime | |
app = Flask(__name__) | |
url_noc = 'https://noc.rub.de/cgi-bin/status/' |
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/python | |
from sh import hostname, checkupdates, yay, touch | |
from tg_bot import send | |
chatid = '000000000' | |
updates = checkupdates() | |
if updates: |
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/python | |
import os | |
import i3ipc | |
import sys | |
import pickle | |
PATH = os.path.expanduser("~/.config/i3/workspace_mapping") | |
def showHelp(): |
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/bash | |
#/etc/udev/rules.d/95-monitor-hotplug.rules | |
#KERNEL=="card0", SUBSYSTEM=="drm", ENV{DISPLAY}=":0", ENV{XAUTHORITY}="/home/yama/.Xauthority", RUN+="/home/yama/scripts/monitor-hotplug.sh" | |
# udevadm control --reload-rules && udevadm trigger | |
xrandr | grep -q "DP2-8 connected" | |
connected1=$? | |
xrandr | grep -q "DP2-1-8 connected" |