Главная » soft, programming » Linux » Linux tips

Linux tips

$getconf LONG_BIT
64

ext4magic/unstable 0.3.2-6 amd64 [upgradable from: 0.3.2-5]
recover deleted files from ext3 or ext4 partitions

forensics-all/unstable,unstable 1.2 all
Debian Forensics Environment — essential components (metapackage)

====================================================
watch -n 1 -d sensors # when no temp system tray

xrandr —output eDP-1 —brightness 0.9 #xbacklight
echo 70 | sudo tee /sys/class/backlight/intel_backlight/brightness #

ffmpeg -i Xnphb.mp4 -s 352×288 -vcodec h263 -b:v 15850 -r 16 -acodec libopencore_amrnb -ac 1 -ar 8000 -ab 12.2k vid.3gp

ffmpeg -i 720p.mp4 -s 352×288 -vcodec h263 -b:v 500000 -r 25 -acodec libopencore_amrnb -ac 1(2?) -ar 8000 -ab 12.2k 720p.mp4.3gp

-s 704×576
-ab 23.85 kbit/s

ogg to mp3(for wrong device)
for name in *.ogg; do ffmpeg -i «$name» -ab 128k -map_meta_data 0:0,s0 «${name/.ogg/.mp3}»; done;

=========================================================== video for chinese mobile ffmpeg -i file.webm -vcodec mpeg4 -acodec aac -strict -3 file.mp4
OR:
find ./ -name ‘*.mp4’ -exec bash -c ‘ffmpeg -i «$0» -vcodec mpeg4 -acodec aac -strict -3 «${0%%.mp4}.alcatel.mp4″‘ {} \;

==========================================mp4 -> webm================
find ./ -name '*.mp4' -exec bash -c 'ffmpeg -i "$0" -vcodec libvpx -acodec libvorbis -cpu-used 5 -threads 8 "${0%%.mp4}.webm"' {} \;
=====================================mp4 split=======================

ffmpeg -ss 00:00:00 -t 00:14:14 -i kmvd_Large.mp4 -acodec copy -vcodec copy kmvd1.mp4

ffmpeg -ss 00:14:14 -t 00:28:28 -i kmvd_Large.mp4 -acodec copy -vcodec copy kmvd2.mp4

========================================================================
dunst is evil # notification
teamviewer service is evil # sudo teamviewer —daemon disable
========================================================================

SRWARE IRon
/usr/share/iron/iron —ppapi-flash-path=/usr/share/iron/libpepflashplayer.so —ppapi-flash-version=19.0.0.245

==================================================================

Enable/disable keyboard:
xinput set-prop 11 "Device Enabled" 1
xinput set-prop 11 "Device Enabled" 0

Also:
Disable / enable keyboard and mouse in Linux

Sometimes, you may need to disable mouse and keyboard on a remote server / PC running X (i.e. over SSH) and Linux (or any other operating system running X).

Here is how to do it:

First, list the devices your X sees:

$ xinput —list
«Virtual core pointer» id=0 [XPointer]
«Virtual core keyboard» id=1 [XKeyboard]
«Keyboard2» id=2 [XExtensionKeyboard]
«Mouse2» id=3 [XExtensionKeyboard]

Now, list details for the mouse (id=3):

$ xinput —list-props 3
Device ‘Mouse2’:
Device Enabled (119): 1
Evdev Reopen Attempts (254): 10
Evdev Axis Inversion (257): 0, 0
Evdev Axis Calibration (258):
Evdev Axes Swap (259): 0
Evdev Middle Button Emulation (260): 2
Evdev Middle Button Timeout (261): 50
Evdev Wheel Emulation (262): 0
Evdev Wheel Emulation Axes (263): 0, 0, 4, 5
Evdev Wheel Emulation Inertia (264): 10
Evdev Wheel Emulation Timeout (265): 200
Evdev Wheel Emulation Button (266): 4
Evdev Drag Lock Buttons (267): 0

Disable the mouse:

$ export DISPLAY=:0
$ xinput set-int-prop 3 «Device Enabled» 8 0

Enable the mouse again:

$ xinput set-int-prop 3 «Device Enabled» 8 1

Disable the keyboard:

$ xinput set-int-prop 2 «Device Enabled» 8 0

Enable the keyboard again:

$ xinput set-int-prop 2 «Device Enabled» 8 1

You may find more details in «man xinput».
==========================================================================\
===========================================================================
top, htop
remove your ~/.toprc (if any)
start «top»

press z
press V
press 1
press y
press m m
press t t t
press W

this will write a ~/.toprc fairly similar to what you are used to.
================================================================================
GIMP Anti watermark
* The Resynthesizer plugin is accessible from the menu:
* * Filters -> Map -> Resynthesize
* * Filters -> Enhance -> Smart enlarge/sharpen
* * Filters -> Enhance -> Heal selection
=================================================================================
bash:
export PS1=»\[\e[32m\]┌————————($(date ‘+%A %d %B %Y %r’))-——(\w) \n└> \[\e[m\]»

===========================================================================

combine — merge image
2016-12-03 14:05:17 ⌚ sidbox in /media/user/WD-Refinement/store/BACKUP/MY
○ → convert 2.png 3.png +append passport1.png

2016-12-03 14:05:48 ⌚ sidbox in /media/user/WD-Refinement/store/BACKUP/MY
○ → convert 4.png 5.png +append passport2.png

2016-12-03 14:06:07 ⌚ sidbox in /media/user/WD-Refinement/store/BACKUP/MY
○ → convert passport1.png passport2.png -append passport3.png

=========================
DISABLE TOUCHPAD WHILE TYPING
syndaemon -i 1.0 -K -R -t

 

Реклама

Добавить комментарий

Заполните поля или щелкните по значку, чтобы оставить свой комментарий:

Логотип WordPress.com

Для комментария используется ваша учётная запись WordPress.com. Выход / Изменить )

Фотография Twitter

Для комментария используется ваша учётная запись Twitter. Выход / Изменить )

Фотография Facebook

Для комментария используется ваша учётная запись Facebook. Выход / Изменить )

Google+ photo

Для комментария используется ваша учётная запись Google+. Выход / Изменить )

Connecting to %s