Skip to content

Instantly share code, notes, and snippets.

View Beyarz's full-sized avatar
💎
Searching for Ruby gems

Beyar Beyarz

💎
Searching for Ruby gems
  • Sweden
  • 03:56 (UTC +02:00)
View GitHub Profile
@Beyarz
Beyarz / git.md
Last active April 18, 2024 11:31
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 / gpg.md
Last active April 12, 2024 16:31
gpg

Generate key

gpg --full-generate-key

Export key

gpg --armor --export-options export-minimal --export KEY or simply gpg --armor --export KEY

Get keys

@Beyarz
Beyarz / windows_subsystem_cmd.md
Last active March 28, 2024 13:01
Windows unix commands in CMD

Run unix stuff in cmd

Run: choco install msys

Symlink directory (some project assume its in C:\msys64): MKLINK /D "C:\msys64" "C:\tools\msys64"

Add the following path C:\msys64\usr\bin to your PATH environment variable

Now you shoule be able to run pacman -Q, choco list | sed s/msys2/test/g, help | grep disk

@Beyarz
Beyarz / Dockerfile
Last active March 14, 2024 10:52 — forked from jcavat/Dockerfile
Updated version of: docker-compose with Php 7.2.6, Mysql 8.0.16, Phpmyadmin 4.8 & Apache
FROM php:7.2.6-apache
RUN docker-php-ext-install mysqli
@Beyarz
Beyarz / redirect-nitter.js
Last active January 29, 2024 13:34
Redirect from twitter to nitter
// ==UserScript==
// @name Redirect to nitter
// @version 1.0
// @description Automatically redirect from twitter to nitter
// @include /^https?:\/\/(www\.)?(twitter\.com|x\.com)\/.+$/
// @run-at document-start
// ==/UserScript==
(function() {
const nitterInstance = 'nitter.net'
@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
We can make this file beautiful and searchable if this error is corrected: It looks like row 2 should actually have 1 column, instead of 7. in line 1.
2023;Jan;Feb;Mars;April;Maj;Juni;Juli;Aug;Sep;Okt;Nov;Dec
Södertörn;469,25;469,25;424,5;424,5;439;439;435;435;460;460;457,5;457,5
Stockholm;497,5;497,5;425;425;460;460;465;465;529;529;485;485
Nacka;-;-;520;520;449,75;449,75;455,25;455,25;462,5;462,5;470,25;470,25
Solna;535;535;437,5;437,5;491,75;491,75;-;-;503,5;503,5;470;470
Attunda;503;503;417,5;417,5;460,5;460,5;431,25;431,25;475;475;453,75;453,75
2022;Jan;Feb;Mars;April;Maj;Juni;Juli;Aug;Sep;Okt;Nov;Dec
Södertörn;452,5;452,5;423,75;423,75;436;436;487,75;487,75;441,25;441,25;454,75;454,75
Stockholm;498,5;498,5;482,5;482,5;470;470;453;453;477,5;477,5;475;475
Nacka;463,5;463,5;426;426;426,5;426,5;-;-;452,5;452,5;440;440
@Beyarz
Beyarz / unrar.md
Created April 4, 2021 00:07
unrar in macOS

Unrar

brew install --cask rar

unrar e FILENAME

@Beyarz
Beyarz / itob.rb
Created August 19, 2023 19:37
Convert integer to binary
def itob(number)
decimals = []
while (number.positive?)
number, remainder = number.divmod(2)
decimals << remainder
end
bits = decimals.length.times.map { |i| 2**i }
validate_sum = 0
@Beyarz
Beyarz / ssh.md
Last active July 28, 2023 12:57
Ssh key

SSH

Create key

ssh-keygen -t rsa -b 4096 -C "user@email.com"

Get public key

cat /Users/NAME/.ssh/id_rsa.pub