Куча знаний

Разное

Цвета в консоли, источник
Цвета X терминала
WinIO opensource (работа с портами)
setxkbmap -layout 'us,ru' -option 'grp:alt_shift_toggle,grp_led:scroll,numpad:microsoft,compose:caps'
Переконфигурация xorg.conf: nvidia-xconfig
/usr/share/X11/locale/en_US.UTF-8/Compose
Makefile
find . -name '*.txt' -type f -exec grep 'pattern' {} \;
grep -rn 'pattern' '*.txt'
MSDN AA
DrWeb CureIt! download =)
dia
Номера файловых систем
md5 хеши
FAT attributes in GNU/Linux: The first step, after installing mtools of course, is to set up a drive letter for your USB device in your ~/.mtoolsrc file. This can be done by adding something like the following: drive s: file="/dev/sdb1" mtools_skip_check=1
Оригинальные прошивки на DLink
Условные предложения English
Схема пера Genius G-PEN 450

Электродинамика


Web

Формы HTML
HTML5 canvas
libwebsocket api, libwebsocket example (c)
Аккорды ПВ (БД)
javascript:document.cookie='aaa=111'
Facebook share debugger
Измеритель скорости страничек от гугля

Настройка vim:

Vim wiki
Vim replace
opennet
dimio-blog
openkazan
:mksession filename
vim -S filename
показать изменения :w !diff % -

Аудио-видео:

mplayer -dumpaudio video.flv -dumpfile audio.mp3
mplayer -vc null -vo null -ao pcm:fast имя_видеофайла
ffmpeg -i input.3gp output.mp4

ubuntu + dvd

sudo apt-get install libdvdread4
sudo /usr/share/doc/libdvdread4/install-css.sh
Теперь вставляем диск с фильмом и смотрим. VLC воспроизводит отлично.
Эталоны нот

MIDI

MIDI
habr

Настройка связки nginx+php

Lenny
Долго не работало из-за
fastcgi_param SCRIPT_FILENAME /var/www/$fastcgi_script_name;
Переменная $document_root не работает.

Шпора по языкам

Perl
CSS (online)
PHP (online)
SQL via php-myadmin (online)
PHP + MySQL
Bash
Визуализатор RegExp
sed
sed example 1
sed example 2
egrep '^flags.*(vmx|svm)' /proc/cpuinfo
日本語 cards

LaTeX

Floating objects
LaTeX
Конспект

Windows

Права КС
Win MUI
Alt symbols
Bluetooth for Win
PL-2303XD Windows 10 issue (Code 10) (local copy)

При проблемах с сертификатами Opera 9

go to your Opera profile folder, the path of which you find in opera:about, and after Opera is shut down, rename the file opcacrt6.dat to something else. When you restart Opera this file will be regenerated for data in the executable.

Подключение сетевого диска из cmd

net use x: \\имя компьютера\имя общего ресурса

Elevate privileges (for deleting autoupdate tasks)

From run as administrator cmd:
psexec -s -i cmd
and new "real administrator" console appears

No fucking autoupdates for Win10

Windows 10 thinks it can reboot users machines without any permission to do that. That is unacceptable!
Diagnose the source of the reboot
https://stackoverflow.com/questions/2140092/how-can-i-get-the-windows-last-reboot-reason In eventvwr.msc find Windows Logs/System, filter for event code 1074 (all autoupdate reboots go there).
Disable regular updates
It does not prevent user from manually perform the updates. For task scheduler run in elevated privileges cmd
taskschd.msc /s

Disable there tasks for scan

Disable Windows Update Center in services gpedit.msc, in Computer policy/Administrative templates/Windows components/Windows update/Configure automatic updates — set to 2 set to disabled.

After that it will only prompt to download and install updates, won't do it all by itself =)

Security updates (hopefully)
Previous measures does not prevent machine to reboot itself anyway((( So hopefully we could disable the file causing that. https://superuser.com/questions/972038/how-to-get-rid-of-updates-are-available-message-in-windows-10/1006199#1006199 Disable access to the source of reboots: MusNotification.exe
cd /d "%Windir%\System32"
takeown /F MusNotification.exe
icacls MusNotification.exe /deny Everyone:(X)
takeown /F MusNotificationUx.exe
icacls MusNotificationUx.exe /deny Everyone:(X)

Как устанавливать нативные пакета пайтона на венде

/knowled/knowledge/ge/
  • install MinGW with C++ Compiler option checked
  • add C:\MinGW\bin to your PATH
  • in PYTHONPATH\Lib\distutils, create a file distutils.cfg and add these lines:
    [build]
    compiler=mingw32
  • edit the file C:\Python27\Lib\distutils\cygwinccompiler.py: In this file you must remove every occurence of -mno-cygwin.

save to

The WebExtension API only allows saving into directories relative to the default download directory. Symlinks can be used to get around this limitation:
mklink /D C:\path\to\symlink D:\path\to\actual

Gentoo

KDE (2013 06)

Проблема с автомонтированием

An unspecified error has occurred: Adding read ACL for uid 1000 to /run/media/my_user

/run/media/my_user isn't created there for nothing will mount. If you create this directory manually it works as expected:
mkdir -p /run/media/my_user
chown my_user:my_user /run/media/my_user
chmod 750 /run/media/my_user
How to disable screensaver when running fullscreen Flash
Tue Sep 06, 2011 1:49 pm

In short:

cd ~/.kde4/Autostart
wget https://raw.github.com/unhammer/lightsOn/68066bdaf645abd7f1b8e95fc7ae20b6d11d63fd/lightsOn.sh
sed -i.tmp s/^screensaver=xscreensaver/screensaver=kscreensaver/ lightsOn.sh
rm lightsOn.sh.tmp

then log out and log in again, and enjoy fullscreen flash without having to turn off your screensaver/power management :-)

If you run xscreensaver instead of KDE's kscreensaver, you can remove the sed line, the script supports both. The original script was written by https://github.com/iye (script at https://github.com/iye/lightsOn), I just added two lines to support KDE.

unhammer

AVR ld problem

Toolchain for AVR — avr-libc. При установке вылезет требование установить собтвенно тулчейн, и укажет команду.

/usr/libexec/gcc/avr/ld: cannot open linker script file ldscripts/avr5.x: No such file or directory

This bug is in bugzilla, this is a workaround for gentoo bug 147155:
ln -s /usr/lib/binutils/avr/2.20.1/ldscripts /usr/avr/lib/ldscripts

emerge

Corrupted sqlite base

DatabaseError: database disk image is malformed

Solution:
# rm -rf /var/cache/edb/dep/
# emerge --metadata
# rm /var/cache/eix
# eix-update
emerge is pip
# /usr/lib/python-exec/python3.3/emerge -av portage
# /usr/lib/python-exec/python3.3/emerge -av python-exec

audacity

Segfault after message about tmpdir

Just add this to new cfg:

[Directories]
TempDir=/tmp/audacity-sio

MYSQL

Logging all queries
SET global log_output = 'FILE';
SET global general_log_file='/Applications/MAMP/logs/mysql_general.log';
SET global general_log = 1;
can be turned off with
SET global general_log = 0;
Used 10915