Skip to content

Instantly share code, notes, and snippets.

View hrvoj3e's full-sized avatar
💻
Cloning ...

Hrvoje hrvoj3e

💻
Cloning ...
View GitHub Profile
@ttimasdf
ttimasdf / 00-Systemd_service_for_autossh.md
Last active June 19, 2024 06:58 — forked from thomasfr/autossh.service
Systemd service for autossh

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/[email protected] | \
  sudo tee /etc/systemd/system/[email protected]

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 November 13, 2018 21:25
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.
version: '2'
services:
portainer:
image: portainer/portainer
container_name: portainer
restart: always
environment:
- VIRTUAL_HOST=docker.DOMAIN.TLD
@magnetikonline
magnetikonline / README.md
Last active October 10, 2024 17:31
List all Git repository objects by size.

List all Git repository objects by size

Summary

Bash script which will:

  • Iterate all commits made within a Git repository.
@hieblmedia
hieblmedia / .gitignore
Last active September 11, 2024 13:03
Gitignore - Exclude all except specific subdirectory
#
# 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 June 6, 2012 10:11
Installing Solr 3.4.0 in Ubuntu 11.10
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 February 2, 2012 04:30
Common .htaccess Redirects
#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/