Skip to content

Instantly share code, notes, and snippets.

@Beyarz
Beyarz / used-by-apple.md
Last active May 30, 2026 18:01
Products and services used by Apple Inc, since Sep 12, 2019
@Beyarz
Beyarz / guide.md
Last active May 26, 2026 02:27
Install the Apache Web Server on Ubuntu

Install apache web server

sudo apt update

sudo apt install apache2

List the ufw application profiles by typing:

sudo ufw app list

@Beyarz
Beyarz / default.txt
Created August 5, 2021 18:56
The Default Username and Password on all Raspberry Pi OS
Raspberry Pi Distributions Username Password
Raspberry Pi OS pi raspberry
DietPi root dietpi
Lakka Linux root root
Kali Linux root toor
OpenELEC root openelec
Arch Linux ARM root root
Debian pi raspberry
LibreELEC root libreelec
OSMC osmc osmc
@Beyarz
Beyarz / git.md
Last active December 23, 2025 19:19
git

Git

Walk through history of changes

git log --patch app/javascript/startingpage.vue

fatal: refusing to merge unrelated histories

git pull origin main --allow-unrelated-histories

@Beyarz
Beyarz / insta.js
Last active August 29, 2025 14:17
Instagram profile auto scroll to bottom
// https://www.instagram.com/USER
const observer = new MutationObserver((mutations) => window.scrollTo(0, document.body.scrollHeight));
const profileNode = document.querySelector('main');
if (profileNode) {
observer.observe(profileNode, { childList: true, subtree: true });
window.scrollTo(0, document.body.scrollHeight);
}
@Beyarz
Beyarz / Gemfile
Created June 24, 2025 17:46
Mini RAG, ask questions to a little language model about your data
# frozen_string_literal: true
source 'https://rubygems.org'
gem 'informers', '~> 1.2'
gem 'pry', '~> 0.15.2', group: :development
gem 'solargraph', '~> 0.55.2', group: :development
@Beyarz
Beyarz / README.md
Last active June 2, 2025 18:56
Comprehensive guide to get working environment with MRuby

Getting started

Compile on Windows

  1. Install msys2 (because we need mingw64, gcc and libws2_32.a)
  2. Open msys2 or mingw64 and run pacman -S mingw64/mingw-w64-x86_64-mruby
  3. Get MRuby and extract the folder
  4. Run make inside the folder mruby-3.3.0, there will be a new folder called /build after the compilation, we need the file at /build/host/lib/libmruby.a
  5. Compile using the following command gcc main.c -I"mruby-3.3.0/include" "mruby-3.3.0/build/host/lib/libmruby.a" "C:\msys64\mingw64\lib\libws2_32.a" -lm -o main or substitue "C:\msys64\mingw64\lib\libws2_32.a" with -lws2_32
  6. Run the compiled binary main.exe
@Beyarz
Beyarz / README.md
Created May 10, 2025 14:36
Chat with a friend through LAN. script I wrote 8 years ago. Adding it here for memory.

Talkwithme

One script, two purposes.

Setup guide (server)

  • Run python2 talkwithme.py
  • Press 1 then hit enter
  • Enter your private ip address (it will be printed out)
  • Enter any port number (that is not in use)
  • Enter the clients ip address
  • Enter the clients port number
@Beyarz
Beyarz / cheatsheet.md
Last active February 4, 2025 09:56
Youtube download (yt-dlp) cheatsheet

Cheatsheet

Download single video

yt-dlp https://www.youtube.com/watch?v=ABC123

Download whole channel

yt-dlp -f best -ciw -o "%(title)s.%(ext)s" -v https://www.youtube.com/channel/ABC123

@Beyarz
Beyarz / power_set.rb
Last active January 1, 2025 18:07
Calculate power set from an array
arr = [1, 2, 3]
# => [1, 2, 3]
def power_set(arr)
result = [[]]
arr.each do |element|
result += result.map do |num|
num + [element]
end