Skip to content

Instantly share code, notes, and snippets.

View canthis's full-sized avatar

SilentDepthz canthis

  • CanThis
  • Rēzekne, Latvia
View GitHub Profile
@canthis
canthis / Dockerfile
Created August 9, 2022 14:20
WinterCMS in separate containers
FROM php:8.0-fpm
# Set working directory
WORKDIR /var/www/html/public
# Install system dependencies
RUN apt-get update && apt-get install -y \
strace \
curl \
libpng-dev \
@canthis
canthis / docker-compose.yml
Created August 9, 2022 14:16
WinterCMS serversideup/docker-php configuration
version: '3'
services:
app:
image: serversideup/php:8.0-fpm-nginx
environment:
AUTORUN_ENABLED: "false"
ports:
- "80:80"
@canthis
canthis / stop-docker-containers-fuzzy.sh
Last active September 2, 2020 14:41
Stop Docker containers via fuzzy matching on the container name
docker ps --format '{{.Names}}' | grep "keyword" | awk '{print $1}' | xargs -I {} docker stop {}
@canthis
canthis / install-go.sh
Created April 19, 2019 19:48
Install Golang Linux
#!/bin/bash
## Install Golang 1.12.4 64Bits on Linux (Debian|Ubuntu|OpenSUSE|CentOS)
## Run as root (sudo su)
GO_URL="https://storage.googleapis.com/golang"
GO_VERSION=${1:-"1.12.4"}
GO_FILE="go$GO_VERSION.linux-amd64.tar.gz"
@canthis
canthis / win10-cmd-context-menu.md
Created April 18, 2019 06:42
Wiindows 10 bring cmd back to context menu
  1. Launch regedit
  2. Navigate to Computer\HKEY_CLASSES_ROOT\Directory\Background\shell\cmd
  3. Right click on cmd folder on registry tree and choose "Permissions"
  4. Click on "Advanced" button
  5. On the top click on "Change" link
  6. Type in your user name and click "Check Names"
  7. Check "Replace owner on subcontainers and objects" checkbox then click "Apply" and "OK"
  8. From "Group or user names" list select "Administrators (YOURPCNAME\Administrators)" and Allow "Full Control"
  9. Select "HideBasedOnVelocityId" key and rename it to "ShowBasedOnVelocityId"
@canthis
canthis / golang-linux-add-to-path.md
Last active April 17, 2019 11:26
Add GoLang to PATH on Linux

Add required paths to the PATH environment variable by inserting the lines below in your /etc/profile file for a system-wide installation or $HOME/.profile or $HOME./bash_profile for user specific installation:

Using your preferred editor, open the appropriate user profile file as per your distribution and add the lines below, save the file and exit:

export GOPATH="$HOME/go"
export GOBIN="$GOPATH/bin"
export PATH="$PATH:/usr/local/go/bin"
export PATH="$PATH:$GOBIN"

The final step under this section is to effect the changes made to the user profile in the current bash session like so: