Skip to content

Instantly share code, notes, and snippets.

View haringsrob's full-sized avatar
🏠
Working from home

Harings Rob haringsrob

🏠
Working from home
View GitHub Profile
@In-line
In-line / Dockerfile
Last active May 7, 2024 10:49
AMD 7900 XTX Stable Diffusion Web UI docker container (ROCM 5.5_rc4)
FROM rocm/composable_kernel:ck_ub20.04_rocm5.5_rc4
RUN mkdir /SD
# Clone SD
WORKDIR /SD
RUN git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui
WORKDIR /SD/stable-diffusion-webui
RUN git reset --hard 22bcc7be428c94e9408f589966c2040187245d81
@kiennq
kiennq / build_emacs.sh
Last active January 29, 2023 20:32
Build emacs-snapshot on Ubuntu 18.04
git clone --single-branch --depth=1 https://github.com/emacs-mirror/emacs.git
cd emacs/
sudo apt install -y autoconf make gcc texinfo libxpm-dev \
libjpeg-dev libgif-dev libtiff-dev libpng-dev libgnutls28-dev \
libncurses5-dev libjansson-dev libharfbuzz-dev
./autogen.sh
./configure --with-json --with-modules --with-harfbuzz --with-compress-install \
--with-threads --with-included-regex --with-zlib --with-cairo --without-rsvg\
--without-sound --without-imagemagick --without-toolkit-scroll-bars \
--without-gpm --without-dbus --without-makeinfo --without-pop \
@danielstgt
danielstgt / imagick3.4.3-PHP7.3-forge.sh
Last active May 30, 2023 22:43 — forked from rostockahoi/imagick3.4.3-PHP7.2-forge.sh
Install Imagick 3.4.3 on PHP 7.3 server (Laravel Forge)
#!/bin/bash
if [ "$EUID" -ne 0 ]
then echo "Please run as root"
exit
fi
apt-get install pkg-config libmagickwand-dev -y
cd /tmp
wget https://pecl.php.net/get/imagick-3.4.3.tgz
tar xvzf imagick-3.4.3.tgz
set ignorecase
set smartcase
set scrolloff=3 " 3 lines above/below cursor when scrolling
" Emulated Plugins
set surround
" set easymotion
set NERDTree
" Copy to system clipboard as well
@dentechy
dentechy / WSL-ssh-server.md
Last active March 30, 2024 16:16
A step by step tutorial on how to automatically start ssh server on boot on the Windows Subsystem for Linux

How to automatically start ssh server on boot on Windows Subsystem for Linux

Microsoft partnered with Canonical to create Bash on Ubuntu on Windows, running through a technology called the Windows Subsystem for Linux. Below are instructions on how to set up the ssh server to run automatically at boot.

  1. Edit the /etc/ssh/sshd_config file by running the command sudo vi /etc/ssh/sshd_config and do the following
    1. Change Port to 2222 (or any other port above 1000)
    2. Change PasswordAuthentication to yes. This can be changed back to no if ssh keys are setup.
  2. Restart the ssh server:
    • sudo service ssh --full-restart
  3. With this setup, the ssh server must be turned on every time you run Bash on Ubuntu on Windows, as by default it is off. Use this command to turn it on:
@dillinghamio
dillinghamio / Spark User Team Seeding.md
Last active November 23, 2020 13:07
Spark User Team Seeding

Seeding Users & Teams In Laravel Spark

Makes 5 users each with 1 team that has 5 members

Add a team factory to database/factories/ModelFactory.php

$factory->define(App\Team::class, function (Faker\Generator $faker) {
    return [
 'name' => $faker->sentence,
@spalladino
spalladino / mysql-docker.sh
Created December 22, 2015 13:47
Backup and restore a mysql database from a running Docker mysql container
# Backup
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql
# Restore
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE
@tsl0922
tsl0922 / .tmux.conf
Last active May 7, 2024 03:53
vim style tmux config
# vim style tmux config
# use C-a, since it's on the home row and easier to hit than C-b
set-option -g prefix C-a
unbind-key C-a
bind-key C-a send-prefix
set -g base-index 1
# Easy config reload
bind-key R source-file ~/.tmux.conf \; display-message "tmux.conf reloaded."