Skip to content

Instantly share code, notes, and snippets.

@Beyarz
Beyarz / Install vnc.md
Last active August 5, 2021 22:22
Install VNC

Install VNC

Recommended utility for macOS

ServerAccess

Ubuntu

sudo apt update

@Beyarz
Beyarz / Screen.md
Last active November 24, 2021 16:57
Screen notes

Screen

Start a new named screen session:

screen -S session_name

Run command & detach

screen -S serve -dm yarn run serve

@Beyarz
Beyarz / rsync.md
Last active November 18, 2019 14:50
rsync notes

rsync

Config file

vi /etc/rsyncd.conf

Example config

pid file = /var/run/rsyncd.pid
lock file = /var/run/rsync.lock
@Beyarz
Beyarz / adduser.md
Last active August 7, 2021 23:36
Add & remove user

Adduser & Deluser

Create user and their home directory

adduser NAME --home /home/NAME

Delete user

deluser NAME

# Video ID Video Title Plays Likes Download URL
1 ID NAME 0 0 https://player.vimeo.com/play/abc&download=1
2 ID NAME 0 0 https://player.vimeo.com/play/efg&download=1
3 ID NAME 0 0 https://player.vimeo.com/play/hij&download=1
@Beyarz
Beyarz / vagrant
Last active May 16, 2020 12:45
Vagrant
---
...user that doesn't match the current user
vi .vagrant/machines/default/virtualbox/creator_uid
Replace the id with your id which were provided by the red error message
---
An error occurred while downloading the remote file. The error
@Beyarz
Beyarz / du.md
Last active December 9, 2019 21:03
Count every file size in a directory
Example
du -ach -I .git -I .dub
@Beyarz
Beyarz / notes.md
Last active December 27, 2019 19:04
Windows subsystem lost password

cat /etc/passwd

open regedit and navigate to HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Lxss

set the DefaultUid to 0

passwd USERNAME

You should now be able to set your new password

@Beyarz
Beyarz / log.md
Last active December 27, 2019 20:13
rails on windows

Get the windows subsystem (ubuntu)

sudo apt update && sudo apt dist-upgrade && sudo apt-get autoremove && sudo apt-get clean

sudo apt-get install git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev software-properties-common libffi-dev libreadline-dev zlib1g-dev

(Updated version can be found here https://rvm.io/)
gpg2 --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
curl -sSL https://get.rvm.io | bash -s stable --rails
source /etc/profile.d/rvm.sh

@Beyarz
Beyarz / .vimrc
Last active June 30, 2022 20:19
vi ~/.vimrc
set number
filetype on
filetype plugin on
filetype indent on
syntax on
set cursorline
set tabstop=2