Skip to content

Instantly share code, notes, and snippets.

Avatar
💻
Cloning ...

hrvoj3e

💻
Cloning ...
View GitHub Profile
@ttimasdf
ttimasdf / 00-Systemd_service_for_autossh.md
Last active Aug 10, 2022 — forked from thomasfr/autossh.service
Systemd service for autossh
View 00-Systemd_service_for_autossh.md

Usage

curl -sSL https://gist.githubusercontent.com/ttimasdf/ef739670ac5d627981c5695adf4c8f98/raw/autossh@host1 | \
  sudo tee /etc/default/autossh@example
curl -sSL https://gist.githubusercontent.com/ttimasdf/ef739670ac5d627981c5695adf4c8f98/raw/autossh@.service | \
  sudo tee /etc/systemd/system/autossh@.service

sudo useradd -g nogroup -s /bin/false -m tunnel
sudo -u tunnel mkdir -p ~tunnel/.ssh # and copy your private key here
@joelhans
joelhans / docker-compose.yml
Last active Nov 13, 2018
My self-hosting `docker-compose.yml` file. To use, 1) set up your DNS, 2) replace domain/email fields, 3) execute `docker-compose up -d`. Should work.
View docker-compose.yml
version: '2'
services:
portainer:
image: portainer/portainer
container_name: portainer
restart: always
environment:
- VIRTUAL_HOST=docker.DOMAIN.TLD
@magnetikonline
magnetikonline / README.md
Last active Dec 6, 2022
List all Git repository objects by size.
View README.md

List all Git repository objects by size

Summary

Bash script to:

  • Iterate all commits made within a Git repository.
@hieblmedia
hieblmedia / .gitignore
Last active Dec 4, 2022
Gitignore - Exclude all except specific subdirectory
View .gitignore
#
# If all files excluded and you will include only specific sub-directories
# the parent path must matched before.
#
/**
!/.gitignore
###############################
# Un-ignore the affected subdirectory
@manuelmorales
manuelmorales / install_solr_340.sh
Created Jun 6, 2012
Installing Solr 3.4.0 in Ubuntu 11.10
View install_solr_340.sh
wget http://apache.rediris.es/lucene/solr/3.4.0/apache-solr-3.4.0.tgz
tar zxvf apache-solr-3.4.0.tgz
cd apache-solr-3.4.0/
mkdir ../solr
cp -r example/* ../solr/
# cp -r ../ey-cloud-recipes/cookbooks/solr/files/default/conf/ ../solr/solr/
mkdir ../solr/solr/lib
cp dist/apache-solr-cell-3.4.0.jar ../solr/solr/lib/
cp contrib/extraction/lib/*jar ../solr/solr/lib/
cd ../solr
@ScottPhillips
ScottPhillips / .htaccess
Created Feb 2, 2012
Common .htaccess Redirects
View .htaccess
#301 Redirects for .htaccess
#Redirect a single page:
Redirect 301 /pagename.php http://www.domain.com/pagename.html
#Redirect an entire site:
Redirect 301 / http://www.domain.com/
#Redirect an entire site to a sub folder
Redirect 301 / http://www.domain.com/subfolder/