-
-
Save kostyll/d730c1ada3e890606bb8 to your computer and use it in GitHub Desktop.
| sudo upgrade-from-grub-legacy - fix grub |
$dd if=/tmpf/Partition2 of=/dev/sda3 ??????
Setting a bit
Use the bitwise OR operator (|) to set a bit.
number |= 1 << x;
That will set bit x.
Clearing a bit
Use the bitwise AND operator (&) to clear a bit.
number &= (1 << x);), then AND it.
That will clear bit x. You must invert the bit string with the bitwise NOT operator (
Toggling a bit
The XOR operator (^) can be used to toggle a bit.
number ^= 1 << x;
That will toggle bit x.
Checking a bit
You didn't ask for this but I might as well add it.
To check a bit, shift the number x to the right, then bitwise AND it:
bit = (number >> x) & 1;
That will put the value of bit x into the variable bit.
Changing the nth bit to x
Setting the nth bit to either 1 or 0 can be achieved with the following:
number ^= (-x ^ number) & (1 << n);
Bit n will be set if x is 1, and cleared if x is 0.
http://www.torriefamily.org/~torriem/wiki/computer_stuff:crosscompiler
https://wiki.wxwidgets.org/Cross-Compiling_Under_Linux
http://linux.bytesex.org/cross-compiler.html
http://habrahabr.ru/post/162171/
http://gwyddion.net/documentation/user-guide-ru/installation-cross-mingw32.html
http://forums.codeblocks.org/index.php?topic=3343.0
http://usefulbytes.blogspot.com/2009/09/cc-windows-linux.html
http://wiki.lazarus.freepascal.org/Cross_compiling_for_Win32_under_Linux/ru
http://welinux.ru/post/6485/
Android HACK distro - http://habrahabr.ru/post/255601/
Linux kernel dev -
http://habrahabr.ru/company/ua-hosting/blog/268409/
http://habrahabr.ru/company/metrotek/blog/263571/
Linux HILOAD -
http://habrahabr.ru/company/odnoklassniki/blog/266005/
Linux FS -
http://habrahabr.ru/post/264853/ - mhddfs
http://habrahabr.ru/post/261921/ - btrfs
http://habrahabr.ru/post/169983/ - in-place re-encryption
Linux BOOT -
http://habrahabr.ru/post/264843/
http://habrahabr.ru/company/centosadmin/blog/255845/ - systemd
Docker -
http://habrahabr.ru/company/infobox/blog/263001/
BASH
http://habrahabr.ru/post/262127/
Linux Build Distro
http://habrahabr.ru/post/254781/ - custom device
http://habrahabr.ru/post/258227/ - LFS
UEFI
http://habrahabr.ru/post/259283/
Linux Admin
http://habrahabr.ru/post/258279/ - postfix
http://habrahabr.ru/post/258407/ - postfix
http://habrahabr.ru/post/256485/ - internet provider
MXE experiments: https://github.com/mxe/mxe
make MXE_TARGETS='i686-w64-mingw32.shared i686-w64-mingw32.static' qt ffmpeg
need to add http://sourceforge.net/projects/dirac/ dirac codec
env_shared.sh
!/bin/bash
export PATH=/cross/mxe/usr/bin:$PATH
export PKG_CONFIG_PATH_i686_w64_mingw32_shared=/cross/mxe/usr/i686-w64-mingw32.shared
cmake -DCMAKE_TOOLCHAIN_FILE=/cross/mxe/usr/i686-w64-mingw32.shared/share/cmake/mxe-conf.cmake .
bash
env_static.sh
!/bin/bash
export PATH=/cross/mxe/usr/bin:$PATH
export PKG_CONFIG_PATH_i686_w64_mingw32_static=/cross/mxe/usr/i686-w64-mingw32.static
cmake -DCMAKE_TOOLCHAIN_FILE=/cross/mxe/usr/i686-w64-mingw32.static/static/cmake/mxe-conf.cmake .
bash
http://askubuntu.com/questions/32499/migrate-from-a-virtual-machine-vm-to-a-physical-system
wget http://launchpadlibrarian.net/112699162/virtualbox-fuse_4.1.18-dfsg-1ubuntu1_amd64.deb
sudo dpkg -i virtualbox-fuse_4.1.18-dfsg-1ubuntu1_amd64.deb
$mkdir /tmp/f
$sudo vdfuse -f /vms_box/win_8_for_dev/win_8_for_dev.vdi /tmp/f
$su
$cd f
$ls
EntireDisk Partition1 Partition2
$mkdir /tmp/part2
$mount Partition2 /tmp/part2/