…Русский Мир — это когда всё хуёво, но всем похуй.

Stuff

Vim

:set mouse=a
:syntax on
cit
vit

BogoMIPS: i7-3820 vs i7-3517 vs Duo T2300

BogoMIPS: i7-3820 vs i7-3517 vs Duo T2300

Intel(R) Core(TM) i7-3820 CPU @ 3.60GHz
[ 0.000002] Calibrating delay loop (skipped), value calculated using timer frequency.. 7203.89 BogoMIPS (lpj=14407780)
[ 0.172343] smpboot: Total of 8 processors activated (57631.12 BogoMIPS)

Intel(R) Core(TM) i7-3517U CPU @ 1.90GHz
[ 0.000002] Calibrating delay loop (skipped), value calculated using timer frequency.. 4790.31 BogoMIPS (lpj=7981296)
[ 0.120866] smpboot: Total of 4 processors activated (19162.24 BogoMIPS)

Intel(R) Core(TM) i5-4250U CPU @ 1.30GHz
[ 0.000002] Calibrating delay loop (skipped), value calculated using timer frequency.. 3791.28 BogoMIPS (lpj=7582564)
[ 0.109922] smpboot: Total of 4 processors activated (15165.12 BogoMIPS)

Intel(R) Core(TM) Duo CPU T2300 @ 1.66GHz
[ 0.003345] Calibrating delay loop (skipped), value calculated using timer frequency.. 3326.59 BogoMIPS (lpj=5541746)
[ 0.096608] smpboot: Total of 2 processors activated (6652.18 BogoMIPS)

Intel(R) Core(TM) i3-4000M CPU @ 2.40GHz
[ 0.000029] Calibrating delay loop (skipped), value calculated using timer frequency.. 4789.32 BogoMIPS (lpj=9578644)
[ 0.112061] smpboot: Total of 4 processors activated (19157.28 BogoMIPS)

Intel(R) Core(TM) i7-2620M CPU @ 2.70GHz
[ 0.000032] Calibrating delay loop (skipped), value calculated using timer frequency.. 5384.48 BogoMIPS (lpj=8970376)
[ 0.389259] smpboot: Total of 4 processors activated (21542.61 BogoMIPS)

LG G3 (Qualcomm MSM8974PRO-AC):
ARMv7 Processor rev 1 (v7l)
38.40 BogoMIPS (lpj=192000) x4 = 153.60 BogoMIPS

Samsung Galaxy S3:
Processor : ARMv7 Processor rev 0 (v7l)
processor : 0
BogoMIPS : 1592.52

HTC Wildfire:
Processor : ARMv6-compatible processor rev 2 (v6l)
BogoMIPS : 518.45

ALSA: Swap stereo channels

ALSA: Swap stereo channels

~/.asoundrc

pcm.swapped {
    type         route
    slave.pcm    "cards.pcm.default"
    ttable.0.1   1
    ttable.1.0   1
}

pcm.default      pcm.swapped

MongoDB

mongo 127.0.0.1/example_dbname -u username -p password
mongoimport --db db1 --collection c1 < ./products.3eb7cd1a9633.json
db.c1.find()

Android

Important:

  1. 920 Editor
  2. Aard 2 + dictionaries (offline wordnet & lurkmore)
  3. AndroZip Pro
  4. Barcode Scanner
  5. FBReader
  6. FTP Server
  7. GoldenDict Free (en/ru dictionaries)
  8. MAPS.ME (Moscow, Berlin, CZ, NL, PL)
  9. MuPDF (for cheatsheets)
  10. Music Folder Player Free 1.5.6
  11. Orbot: Proxy with Tor
  12. Pale Moon (не палит айпишник через WebRTC) + Phony + uBlock Origin
  13. ProxyDroid 2.7.3
  14. QuickPic 2.9.4
  15. Skype
  16. Smart Time Sync (GPS or NTP)
  17. Termux
  18. VLC
  19. WhatsApp Messenger
  20. Yandex.Maps 3.81
  21. Yandex.Navigator
Misc:
  1. ABBYY Lingvo 1.0.222.2
  2. Adblock Plus (test page)
  3. AFWall+ (для блокировки баннеров в BSPlayer, Moon+ Reader, etc)
  4. Contact Remover
  5. CPU-Z
  6. Dictan - Dictionary Viewer (offline wikipedia)
  7. GPS Test
  8. GPS АнтиРадар
  9. Hola Better Internet
  10. JSConsole
  11. Math Formula Reference
  12. Mathematics
  13. MhtViewer
  14. MSDict Concise Oxford English Dictionary and Thesaurus
  15. NFC TagInfo
  16. SSHelper
  17. SSHTunnel
  18. SuperCHM
  19. Wifi Analyzer
  20. Yandex.Exams
  21. ZArchiver
Miscellaneous
TWRP

adb shell
su
dd if=/dev/zero of=/dev/block/platform/msm_sdcc.1/by-name/recovery
dd if=/sdcard/twrp-2.8.0.0_CHANGEME-signed.img of=/dev/block/platform/msm_sdcc.1/by-name/recovery

adb -s DEVICEID reboot recovery # fastboot
fastboot boot recovery.img      # fyi: recovery.img stored @ pc
adb -s DEVICEID sideload 1-D85520A-lollipop-skin1980.zip
If you wonder what Dynamic fsync is all about, here's what I just added to the OP under "Aroma Settings Explained" : Dynamic fsync settings This is a goodie by faux123, so all credits go to him for creating this unique feature ! Many kernels just disable synchronous writes to file to speed up system. While this works neatly, it is also dangerous as processes believe that file writes are actually sync'ed to disk (or mmc media in our case) while this is not yet true ! The gain is a noticably smoother user experience, but the risk of doing so is to have a corrupted filesystem if the device crashes, user pulls battery, battery fully depleats ... so that the device is turned off unexpectedly. To allow for the benefit, but to minimize the risk, faux123 created dynamic fsync, which while the screen is on, will defer file sync temporarily, but when screen gets turned off, a flush is called to synchronize all outstanding writes keeping your data safe. Now it's up to you to either use this unique feature (that has been enabled by default up until v2.2) or choose to stay stock by disabling it, thus writes being done synchronously, which is safer but also slower.

MySQL, PostgreSQL

Log all queries

  1. Edit my.cnf: general_log = 1 log-output = FILE general_log_file = /tmp/mysql_query.log
  2. mysqld -u mysql
GROUP_CONCAT + sort SELECT GROUP_CONCAT(DISTINCT name ORDER BY name ASC SEPARATOR ", ") listOfBrands FROM tbl_category_brand LEFT JOIN tbl_brand ON tbl_brand.id=brand_id WHERE category_id=:category_id
SELECT SUBDATE( current_date, 1 ) , SUBTIME( current_time, 800 ) Есть две таблицы. 1. Вывести элементы, которые есть в одной таблице, но нет в другой.
    SELECT *
    FROM  `table1`
    LEFT JOIN table2 ON table1.title = table2.title
    WHERE table2.title IS NULL

2. Вывести элементы, которые есть в обеих таблицах.
A:
    SELECT *
    FROM  `table1`
    INNER JOIN table2 ON table1.title = table2.title
B:
    SELECT *
    FROM (
    SELECT title
    FROM table1 AS
    ) AS t1, table2 AS t2
    WHERE t1.title LIKE t2.title

3. Даны таблицы CITY и STREET. CITY: city_id | integer name | varchar(100) STREET: street_id | integer city_id | integer name | varchar(100) Напишите запрос, который выводит все наименования улиц города Москва.
SELECT street.name
FROM street
INNER JOIN city ON street.city_id = city.city_id
WHERE city.name =  'Москва'

4. Даны таблицы CITY и STREET. CITY: city_id | integer name | varchar(100) STREET: street_id | integer city_id | integer name | varchar(100) Напишите запрос, который выводит наименование города и количество улиц в нем. Города, где улиц нет, выводить не нужно.
SELECT city.name, COUNT( street.name )
FROM  `street`
INNER JOIN city ON city.city_id = street.city_id
GROUP BY street.city_id

5. Даны таблицы CITY и STREET. CITY: city_id | integer name | varchar(100) STREET: street_id | integer city_id | integer name | varchar(100) Напишите запрос, который выводит наименование города и количество улиц в нём. Для городов, где улиц нет, в поле с количеством улиц нужно выводить 0.
SELECT city.name, COUNT( street.name )
FROM  `city`
LEFT JOIN street ON street.city_id = city.city_id
GROUP BY city.name

6. Таблица MEASURE measure_id | integer | Идентификатор записи code | varchar(30) | Код измеряемой величины. Например, 'температура', 'давление' measure_date | date | Дата измерения кратна месяцу. Вносится не каждый месяц. Например, '01.08.2005', '01.10.2006', '01.11.2006', '01.01.2007' value | integer | Значение величины Если значение V1 величины M внесено в момент T1 и в T2 оно было изменено на V2, то величина имеет значение V1 для любого момента времени T, где T1 <= T < T2 Напишите запрос, который выводит значение величины "температура" на момент "15.12.2007".
SELECT * FROM `measure` WHERE `measure_date` <= '2007-12-15' ORDER BY measure_date DESC LIMIT 1


SET @v2 = CAST(b'1000001' AS UNSIGNED), @v3 = b'1000001'+0; select @v2, @v3; INSERT INTO `HOUSE_NUMBER_OF_VISITS_BY_MONTH` ( HOUSE_ID, MONTH , YEAR, VIEW_COUNT ) VALUES ( 70, 6, 2022, 1 ) ON DUPLICATE KEY UPDATE VIEW_COUNT = VIEW_COUNT +1 $this->db->execute('SET lc_time_names = "ru_RU"'); mysql # dump MySQL table via PHP exec("mysqldump -u $userName -p$password $database yandex_market | bzip2 -9 > yandexMarketDump9.sql.bz2"); mysql -u username -p dbname < dump.txt # dump MySQL database & backup htdocs: date=`date "+%Y-%m-%d_%H-%M-%S"` mysqldump -u user -ppassword db_name | bzip2 -9 > /home/vasya/backup/project-$date.sql.bz2 tar cjf /home/vasya/backup/project-$date.tar.bz2 /var/www/project --exclude="/somedir1" --exclude="/somedir2"
postgresql/pgsql
# dump
cd /home/user/pgsql_dumps
date=`date "+%Y-%m-%d_%H-%M-%S"`
pg_dump -h 127.0.0.1 -F t -U postgres dbname > dbname_$date.sql.tar
bzip2 dbname_$date.sql.tar

# dump some table:
pg_dump -F t -U postgres dbname --table "specific_classifier_car_brands" > specific_classifier_car_brands.sql.tar

# restore (from dump)
pg_restore -U postgres -d xxx -F t < ./v.tar

# restore (from .sql file)
psql -U postgres -h 127.0.0.1 -p 5433 -d postgres -f ./_countries.sql

Windows Hints & Software

Quake Style Drop Down Terminal for Windows:

http://tech.xster.net/tips/quake-style-drop-down-terminal-for-windows/
http://sourceforge.net/projects/console/
http://www.autohotkey.com/download/

Hibernate from command line: rundll32.exe PowrProf.dll, SetSuspendState

List of Services
runas /user:666 "mmc services.msc"

Add or remove programs
runas /user:666 "control appwiz.cpl"

Local Group Policy Editor
gpedit.msc
perfmon /report

Device Manager
devmgmt.msc
type sta|grep "M "|grep -v "\\\."

Fast folder deletion
del /f/s/q folderName > nul
rmdir /s/q folderName

Write W 7/10 iso image to usb flash drive
https://thornelabs.net/2013/06/10/create-a-bootable-windows-7-usb-drive-in-linux.html

Prank Links


  • https://vk.com/prankrunet
    http://prankru.net
    prank.ru
  • https://vk.com/rupranktv
  • Классика пранка
  • http://prank.su/news/frazy_zhertv_pranka_8/2011-11-11-64
  • http://prankota.com/
    https://vk.com/prankotadotcom
    https://vk.com/peka73rus
  • https://vk.com/theprankvideo
    https://www.facebook.com/Vovan222
    https://www.youtube.com/user/Vovan222prank
    https://twitter.com/evilprank
  • http://www.liveinternet.ru/community/prank_ru/

http://ibigdan.livejournal.com/