Skip to content

Instantly share code, notes, and snippets.

View tommyskott's full-sized avatar
👨‍💻
Swedish Freelancer

Tommy Borgenfalk Skott tommyskott

👨‍💻
Swedish Freelancer
View GitHub Profile
@tommyskott
tommyskott / keybase.md
Created July 31, 2018 22:43
keybase.md

Keybase proof

I hereby claim:

  • I am tommyskott on github.
  • I am tommyskott (https://keybase.io/tommyskott) on keybase.
  • I have a public key ASB3ehQ1eR0OKZFE1cGkpZ6IM4v56t_SGdUIycwxSCUSUQo

To claim this, I am signing this object:

@tommyskott
tommyskott / docker-snippets.md
Last active March 26, 2021 08:18
A few nifty docker commands

Docker Snippets

In order to delete all images, use the given command

docker rmi $(docker images -q)

In order to delete all containers, use the given command

docker rm $(docker ps -a -q)
@tommyskott
tommyskott / git-cheat-sheet.md
Last active December 16, 2021 08:50
Git - Cheat Sheet
@tommyskott
tommyskott / apache-file-permissions.md
Last active May 23, 2022 18:10
Apache file permissions

Apache file permissions

Change owner:group recursively on everything in path

sudo chown -R www-data:www-data .

Change all the directories to 755 (drwxr-xr-x)

sudo find . -type d -exec chmod 755 {} \;
@tommyskott
tommyskott / ~.md
Last active January 17, 2022 13:20
101 good to have commands

~ Hello sudo

101 good to have commands

Install Xcode cli tools

xcode-select --install

Generate a new UUID

@tommyskott
tommyskott / localhost.md
Last active April 20, 2020 14:42
macOS: Localhost, Apache, Php, MariaDB (MySQL)

Localhost with Apache, Php, mariaDB

Apache config

httpd -v
sudo atom /etc/apache2/httpd.conf

Load modules

Apache, Php and Certbot on Ubuntu

Apache

Install Apache
sudo apt-get update
sudo apt-get install apache2

Ubuntu

Package manager

sudo apt-get update # update repos
sudo apt-get upgrade # upgrade installed packages
sudo apt-get dist-upgrade # upgrade system dist

Disk and RAM

PostgreSQL

Install it

Download and follow the 3 steps on: postgresapp

Login

psql

Create database

create database data_base_name;

@tommyskott
tommyskott / scp.md
Last active December 16, 2021 08:49
SCP - Cheat Sheet

SCP - secure copy protocol

Transfer files from unix machines.

In this example, we have setup the credentials for our remote server with the alias of xwing. This allows us to connect to the server without having to type all the credentials every time.

You just simply connect by typing: ssh xwing

We don't need to login before we run the scp command, so let's logout and setup the ssh config.

Type exit to logout.