Quantcast
Channel: Just for fun ;-)
Browsing index pages (33 articles)
↧

wav из mp4

ffmpeg -i input.mp4 -vn -acodec pcm_s16le -ar 44100 -ac 2 output.wav

View Article


Vim search for a pattern and if occurs delete to end of line

:%s/{pattern}.*//

View Article


Перекодировка файла

enconv -x UTF-8 somefile.txt

View Article

Запуск KOI8-R терминала SSH в UTF-8 окружении

luit -encoding "KOI8-R" ssh ip или xterm -en koi8-r (дальше обычный ssh) mc -S dark --stickchars

View Article

How to change pattern recursively

ack -l 'pattern' | xargs perl -pi -E 's/pattern/replacement/g'Explanationackack is an awesome command line tool that is a mix of grep, find, and full Perl regular expressions (not just the GNU subset)....

View Article


Linux check motherboard

sudo dmidecode --string baseboard-product-name

View Article

Работа с русскими именами файлов в ZIP и UNZIP под *nix

Увидеть имена файлов путём перекодировки  ls -N | iconv -f cp1252 -t cp850 | iconv -f cp866Перекодировать распакованные файлы в utf-8 можно следующей командой:   find . -type f -exec sh -c 'np=`echo...

View Article

Count lines in all files

wc -l *

View Article


How to check for changes on remote (origin) git repository?

You could git fetch origin to update the remote branch in your repository to point to the latest version. For a diff against the remote: git diff origin/masterIf you want to accept the remote changes:...

View Article


Read CSV file

sed "s/,/\t/g" filename.csv | less -S

View Article

Convert file from utf8 to cp1251

iconv -f utf8 -t cp1251 < index.php > index.php.1251

View Article

Send html POST command from console

curl --data "param1=value1&param2=value2" http://hostname/resource

View Article

Determine and change file character encoding

file -bi [filename]Example output: steph@localhost ~ $ file -bi test.txt text/plain; charset=us-ascii   Use vim to change a file's encoding:set encoding=utf-8set fileencoding=utf-8

View Article


Create bootable USB key with Windows 7 from Linux

1. dd if=/w7.iso of=/dev/sdx2. ms-sys -7 /dev/sdxLink to ms-sys in AUR (archlinux) 

View Article

Split large file

Have you ever want to split a large file into several small files? I’ve face this problem few days ago. I need to split a large file (3GB log file) into several smaller file where i can read it using...

View Article


Find file by content in linux

grep -rIn 'what' where

View Article

Переименовать группу файлов

Often over time, we will want to reorganize a group of files by renaming them.To rename *.txt to *.bak (e.g. to rename ham.txt to ham.bak)for f in *.txt; do mv "$f" "${f%.txt}.bak"; doneTo remove...

View Article


android vibrator

To make vibrator works you need make few steps:1. in sources:Vibrator vb = ( Vibrator )getApplication().getSystemService( Service.VIBRATOR_SERVICE );vb.vibrate( 1000 );2. in application manifest:...

View Article

Как погасить питание на USB программно?

echo "suspend" > /sys/bus/usb/devices/usb2/power/levelecho "auto" > /sys/bus/usb/devices/usb2/power/level

View Article

Restore files by grep

Шустро восстановить удаленные/потерянные/случайно_измененные текстовые файлы можно и грепомgrep -i -a -B10 -A100 'Строка или текст из файла, который потерпел катастрофу' /dev/sda1 > result.txt...

View Article
Browsing index pages (33 articles)