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 | |
NET=1.1.1. | |
FROM=2 | |
TO=254 | |
IF=eth1 | |
sSTOP=0 | |
control_c(){ | |
echo Catch interrupt signal, aborting... | |
sSTOP=1 |
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 | |
youtube-dl -F "$1" | |
read -e -p "Select preffered format:" FRMT | |
FILE=`youtube-dl -f $FRMT --get-filename "$1"` | |
youtube-dl -f $FRMT "$1" | |
ffmpeg -i "$FILE" -c copy -copyts "${FILE}.mp4" | |
chown user:user "$FILE" | |
chown user:user "${FILE}.mp4" |
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
#==========variables | |
$h="8.8.8.8" | |
$ping=New-object System.Net.NetworkInformation.Ping | |
$window=(get-host).UI.RawUI | |
$c=0; | |
#==========/variables | |
Write-Host "Begin => " | |
while ($True){ |
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
################################################ | |
# Map shares # | |
# Author: H.L. # | |
# Version: 0.3 # | |
# Description: map shares to the system # | |
################################################ | |
#############################what's new | |
#--v0.3-- | |
#- Mount fix, while described multiple shares |
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 sys | |
if sys.version_info.major == 3: | |
from urllib.request import HTTPPasswordMgrWithDefaultRealm, HTTPBasicAuthHandler, Request, build_opener | |
from urllib.parse import urlencode | |
else: | |
from urllib2 import HTTPPasswordMgrWithDefaultRealm, HTTPBasicAuthHandler, Request, build_opener | |
from urllib import urlencode | |
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 | |
tpl_data = """ | |
# Name the components on this agent | |
a{0}.sources = src{0} | |
a{0}.sinks = sink{0} | |
a{0}.channels = c{0} | |
# Use a channel which buffers events in memory | |
a{0}.channels.c{0}.type = memory |
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 | |
COLOR_BEGIN="\033[" | |
COLOR_RED="${COLOR_BEGIN}0;31m" | |
COLOR_ITEM="${COLOR_BEGIN}1;38;05;214m" | |
COLOR_VALUE="${COLOR_BEGIN}1;38;05;110m" | |
COLOR_END="\033[0m" | |
mypath=/sys/block | |
temp=/tmp/hddlist.tmp |
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/dash | |
CURRENT_LANG=$(ibus engine) | |
FLAG_LOCATION=/usr/share/xfce4/xkb/flags | |
RU="xkb:ru::rus" | |
EN="xkb:us::eng" | |
if [ "$CURRENT_LANG" = "$RU" ]; then | |
notify-send -i ${FLAG_LOCATION}/us.svg -t 5000 "Keyboard layout" "RU -> EN" | |
ibus engine ${EN} |
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 sys | |
import shutil | |
class Progressbar(object): | |
def __init__(self, text: str, width: int): | |
self._text = text | |
self._width = width | |
self._max = 0 | |
c = shutil.get_terminal_size(fallback=(80, 24)) |