Skip to content

Instantly share code, notes, and snippets.

@gbaman
gbaman / HowToOTG.md
Last active May 2, 2024 01:27
Simple guide for setting up OTG modes on the Raspberry Pi Zero

Raspberry Pi Zero OTG Mode

Simple guide for setting up OTG modes on the Raspberry Pi Zero - By Andrew Mulholland (gbaman).

The Raspberry Pi Zero (and model A and A+) support USB On The Go, given the processor is connected directly to the USB port, unlike on the B, B+ or Pi 2 B, which goes via a USB hub.
Because of this, if setup to, the Pi can act as a USB slave instead, providing virtual serial (a terminal), virtual ethernet, virtual mass storage device (pendrive) or even other virtual devices like HID, MIDI, or act as a virtual webcam!
It is important to note that, although the model A and A+ can support being a USB slave, they are missing the ID pin (is tied to ground internally) so are unable to dynamically switch between USB master/slave mode. As such, they default to USB master mode. There is no easy way to change this right now.
It is also important to note, that a USB to UART serial adapter is not needed for any of these guides, as may be documented elsewhere across the int

Why to Ignore Russian Internet Laws

There is internet censorship in Russia. VPNs and internet providers are required to install into their networks Revizor, a device that checks that censored sites can't be accessed from their network. They are also required to install SORM (wiki/SORM, another wiki) to help Russian special services to analyse traffic and track users.

If you have or are going to have internet business in Russia I call you to ignore all the demands to install SORM and Revizor into your network. Also don't move personal data to Russia. If you can't avoid complying to these demands then just don't have your business in Russia at all.

Please, don't invest in Cheburnet (autonomous Russian internet that can be easily isolated and abusively censored without any collateral damage). Cheburnet is built to help the Kremlin in power usurpation.

The Reasons

Comparison of ASP.NET and Node.js for Backend Programming

We will compare ASP.NET and Node.js for backend programming.
Source codes from examples.

Updates

This document was published on 21.09.2015 for a freelance employer. Some changes since then (14.02.2016):

  1. Koa.js no longer uses co-routines, it has switched to Babel's async/await. yield and await are used almost in the same way, so I see no point to rewrite the examples.

Tuning Windows 10 for Slow Machines

Windows 10 on slow netbook

This guide is for those who dares to install Windows 10 on slow netbooks (1GB of RAM).
Though Windows update program is over, you still may use old Windows product keys from license stickers to install Windows 10 on old machines.

UPD Jan 2019
This article is quite old, some instructions may be obsolete.

Зашквар / Shaming

Здесь я собираю подноготную из мира политики.

Содержание

  1. Закрытый телеграм-канал 4chan
  2. Максим Кац: см. murzilka.io.
  3. Стас Ай, Как Просто! спросил у Андрея Сербанта почему в Яндексе так много людей, которые не любят путинскую Россию. См. твит Шепелина.
  4. В Avito около 06.04.2023 пользователи заметили, что на сайте появилась возможность вставлять в объявления ролики с платформы Rutube.
@ilyaigpetrov
ilyaigpetrov / Evaluate the Risk of Browser Extension Before Installing It by Reading the Source Code.md
Last active March 29, 2024 19:30
Evaluate the Risk of Browser Extension Before Installing It by Reading the Source Code | by https://git.io/ilyaigpetrov

Evaluate the Risk of Browser Extension Before Installing It by Reading the Source Code

This post is written for Manifest v2, Manifest v3 is not yet released at the moment.

Ok, kids, today we are going to scrutinize a source code of a browser extension to speculate about its risks.
First, you will need to know how to download or view browser extension source codes:

  1. Extension for Chromium/Chrome: https://chrome.google.com/webstore/detail/chrome-extension-source-v/jifpbeccnghkjeaalbbjmodiffmgedin
  2. Right Click for FireFox: https://superuser.com/questions/771825/how-to-examine-source-code-of-firefox-extension-before-installing-it
@ilyaigpetrov
ilyaigpetrov / FAILED: Доставка PinePhone Pro из Гонконга в Россию.md
Last active March 25, 2024 14:53
FAILED: Доставка PinePhone Pro из Гонконга в Россию
@ilyaigpetrov
ilyaigpetrov / _Не устанавливайте российские сертификаты.md
Last active January 5, 2024 16:51
ЧЕРНОВИК: Не устанавливайте российские сертификаты

ЧЕРНОВИК: Не устанавливайте российские сертификаты

20.11.2022

Вкратце: устанавливая себе российский корневой сертификат, вы даёте государству полный контроль над вашим информационным трафиком. Либо не устанавливайте сертификат совсем, либо делайте это безопасно: на виртуальную машину или на отдельный компьютер.

Зачем нужны сертификаты?

Сертификаты криптографических протоколов (TLS/SSL) позволяют нескольким участникам идентифицировать/аутентифицировать

How To Use GitHub Gists For Publishing Articles

GitHub Gists may be used not only for code snippets sharing but as a publishing platform for your articles.

Features And Restrictions Of GitHub Gists

Each gist is a git repo with restrictions and features:

  • You can't create folders in any branch of the repo.
  • Each file in the master branch larger than 1MB risks to be truncated so you can't add zip archive to master. But you may keep additional large files at another branches which can't be viewed on the gist page.
  • If you want to use images in your article but wish non-embedded images to be hidden on the gist page then you may keep them in non-master branch and reference by .//raw//foobar.jpg.