Skip to content

Instantly share code, notes, and snippets.

View spasma's full-sized avatar
🤠
Coding..

Sebastiaan Pasma spasma

🤠
Coding..
View GitHub Profile
@spasma
spasma / angular-css-to-scss.sh
Last active July 2, 2024 01:54
Migrate Angular project from CSS to SCSS (Sass) [Also for Angular Material Projects]
#### Please Backup your project first!!!!!!!!
# run this in your project root folder
# rename all your src files
cd src
find . -name "*.css" -exec bash -c 'mv "$1" "${1%.css}".scss' - '{}' \;
cd ..
# change angular cli config in angular.json
sed -i -e 's/styles.css/styles.scss/g' angular.json
@spasma
spasma / SentryOnCentos7.txt
Created December 24, 2019 08:51
Install Sentry without docker on Centos7
How to install and configure Sentry on CentOS 7
This article covers how to install and configure Sentry error tracking software on CentOS 7 system. Assuming you’ve already installed epel repository, if you haven’t you can do it by just typing yum install epel-release. Let’s start installation!
1) As always, we’ll up-to-date system first. If you want, you can reboot your host after doing that.
yum update -y
2) Install pre-requisites that we’ll use for all softwares.
yum install wget python-setuptools.noarch python2-pip.noarch python-devel.x86_64 libxslt.x86_64 libxslt-devel.x86_64 libxml2 libxml2-devel.x86_64 libzip libzip-devel libffi.x86_64 libffi-devel.x86_64 openssl-libs.x86_64 libpqxx libpqxx-devel libyaml libyaml-devel libjpeg libjpeg-devel libpng libpng12 libpng12-devel libpng-devel net-tools gcc gcc-c++ -y
# If you get the error "Failed to save two-factor authentication : The Perl module Authen::OATH needed for two-factor authentication is not installed. Use the Perl Modules page in Webmin to install it."
# use this:
yum install perl-Moose -y
yum install perl-CPAN -y
cpan
# type in cpan: install Authen::OATH
# done!
@spasma
spasma / private_fork.md
Created September 23, 2023 09:26 — forked from 0xjac/private_fork.md
Create a private fork of a public repository

The repository for the assignment is public and Github does not allow the creation of private forks for public repositories.

The correct way of creating a private frok by duplicating the repo is documented here.

For this assignment the commands are:

  1. Create a bare clone of the repository. (This is temporary and will be removed so just do it wherever.)

git clone --bare git@github.com:usi-systems/easytrace.git

@spasma
spasma / backup.sh
Created October 27, 2023 17:13 — forked from Meldiron/backup.sh
Backup and Restore Appwrite, the lazy way 🐌
# Make sure to stop Appwrite before this backup,
# and make sure you have enough space on the machine.
# After backing up, make sure there is a file in 'backups/backup-___.tar.gz'.
# Also please check size of this file, it should be at least 5kb, even for small instances.
docker run --rm \
-v appwrite_appwrite-mariadb:/backup/appwrite-mariadb \
-v appwrite_appwrite-redis:/backup/appwrite-redis \
-v appwrite_appwrite-cache:/backup/appwrite-cache \