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
Beyarz / Rsync.md
Last active Oct 18, 2019
Rsync notes
View Rsync.md

vi /etc/rsyncd.conf

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

[files]
path = /home/public_rsync
View Screen.md

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
Beyarz / Install vnc.md
Last active Oct 18, 2019
Install VNC on Ubuntu
View Install vnc.md

Install VNC

Recommended utility for macOS

ServerAccess

Install VNC on Ubuntu

sudo apt install vnc4server xfce4 xfce4-goodies

View grep.md

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
Beyarz / ssh.md
Created Oct 11, 2019
Generate ssh key
View ssh.md

Create key

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

@Beyarz
Beyarz / brew.md
Last active Oct 23, 2019
Keep Homebrew packages clean
View brew.md

Update, upgrade & clean /Cellar/

brew upgrade && brew cask upgrade && brew cleanup

In case of issues

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

Reinstall vscode

Delete everything vscode stored

rm -fr ~/Library/Preferences/com.microsoft.VSCode.helper.plist && rm -fr ~/Library/Preferences/com.microsoft.VSCode.plist && rm -fr ~/Library/Caches/com.microsoft.VSCode && rm -fr ~/Library/Caches/com.microsoft.VSCode.ShipIt/ && rm -fr ~/Library/Application\ Support/Code/ && rm -fr ~/Library/Saved\ Application\ State/com.microsoft.VSCode.savedState/ && rm -fr ~/.vscode/

Download a fresh copy

https://code.visualstudio.com/Download

@Beyarz
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">
<head>
<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='https://cdnjs.cloudflare.com/ajax/libs/bulma/0.7.5/css/bulma.min.css' />
@Beyarz
Beyarz / aftonbladet.js
Created Aug 11, 2019
Get rid of all the articles from the sports category on aftonbladet.se
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.