Skip to content

Instantly share code, notes, and snippets.

On vacation

Beyar Beyarz

On vacation
  • MWTDev
  • Sweden
Block or report user

Report or block Beyarz

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
Beyarz /
Last active Oct 18, 2019
Rsync notes

vi /etc/rsyncd.conf

pid file = /var/run/
lock file = /var/run/rsync.lock
log file = /var/log/rsync.log
port = 873

path = /home/public_rsync

Start a new named screen session:

screen -S session_name

Detach from the current session:

Press Ctrl+A then press d

Re-attach a detached session:

screen -r session_name

List all screen sessions:

Beyarz / Install
Last active Oct 18, 2019
Install VNC on Ubuntu
View Install

Install VNC

Recommended utility for macOS


Install VNC on Ubuntu

sudo apt install vnc4server xfce4 xfce4-goodies


Grep notes

Find in current dir with recurs

grep "FIND" . -r

Find & replace in current dir (macOS)

grep -rl "FIND" ./ | xargs sed -i "" 's/FIND/REPLACE/g'

Beyarz /
Created Oct 11, 2019
Generate ssh key

Create key

ssh-keygen -t rsa -b 4096 -C ""

Beyarz /
Last active Oct 23, 2019
Keep Homebrew packages clean

Update, upgrade & clean /Cellar/

brew upgrade && brew cask upgrade && brew cleanup

In case of issues

brew doctor
Beyarz / Reinstall
Created Oct 9, 2019
Fresh copy of vscode
View Reinstall

Reinstall vscode

Delete everything vscode stored

rm -fr ~/Library/Preferences/ && rm -fr ~/Library/Preferences/ && rm -fr ~/Library/Caches/ && rm -fr ~/Library/Caches/ && rm -fr ~/Library/Application\ Support/Code/ && rm -fr ~/Library/Saved\ Application\ State/ && rm -fr ~/.vscode/

Download a fresh copy

Beyarz / random.js
Created Oct 2, 2019
Generate a random string
View random.js
const list = "ABCDEFGHIJKLMNOPQRSTUVWXYZ".split("");
let string = "";
for(var x = 0; x <= 10; x++) {
string += list[Math.floor(Math.random() * Math.floor(25))];
console.log("String: " + string);
View Angle-desgin.html
<!DOCTYPE html>
<html lang="en">
<title>Angle design</title>
<meta charset="UTF-8">
<link rel="stylesheet" href="style.css">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel='stylesheet' href='' />
Beyarz / aftonbladet.js
Created Aug 11, 2019
Get rid of all the articles from the sports category on
View aftonbladet.js
// Open your devtool & paste this in the console
let x=document.getElementsByClassName('abTheme-sportbladet');for(let z=0;z<=x.length;z++){x[z].remove()};
You can’t perform that action at this time.