Skip to content

Instantly share code, notes, and snippets.

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

Viorel-Cosmin Miron uhlhosting

🏠
Working from home
View GitHub Profile
@uhlhosting
uhlhosting / btcpayserver_install_env.sh
Created February 14, 2021 16:02 — forked from rockstardev/btcpayserver_install_env.sh
Setting up BTCPayServer development environment on Linux (Ubuntu)
# Installing prerequisites for BTCPayServer development on Ubuntu
# Install .NET Core SDK 2.2
# https://dotnet.microsoft.com/learn/dotnet/hello-world-tutorial/install?initial-os=linux
wget -q https://packages.microsoft.com/config/ubuntu/18.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb
sudo add-apt-repository universe
@uhlhosting
uhlhosting / alfio
Created November 7, 2020 04:42 — forked from ieugen/alfio
alf.io debian deployment
/etc/default/alfio
----
JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-amd64/jre
MODE=service
#PORT=9001
JAVA_OPTS="-Ddatasource.driver=org.postgresql.Driver -Ddatasource.url=jdbc:postgresql://localhost:5433/alfio -Ddatasource.username=alfio -Ddatasource.password=secret -Ddatasource.dialect=PGSQL -Ddatasource.validationQuery='SELECT 1'"
#!/bin/bash
# Installation:
#
# 1. vim /etc/ssh/sshd_config
# PrintMotd no
#
# 2. vim /etc/pam.d/login
# # session optional pam_motd.so
#

Keybase proof

I hereby claim:

  • I am uhlhosting on github.
  • I am kosmos (https://keybase.io/kosmos) on keybase.
  • I have a public key ASCST8u0PSOrtvxm7PYk_ke531LkuCyRhAykiIl1hJ1PnAo

To claim this, I am signing this object:

@uhlhosting
uhlhosting / nginxproxy.md
Created September 3, 2018 20:29 — forked from soheilhy/nginxproxy.md
How to proxy web apps using nginx?

Virtual Hosts on nginx (CSC309)

When hosting our web applications, we often have one public IP address (i.e., an IP address visible to the outside world) using which we want to host multiple web apps. For example, one may wants to host three different web apps respectively for example1.com, example2.com, and example1.com/images on the same machine using a single IP address.

How can we do that? Well, the good news is Internet browsers

@uhlhosting
uhlhosting / wp-config.php
Created March 28, 2018 20:13 — forked from MattWilcox/wp-config.php
Bits to add to wp-config.php to make things sane when developing in a real development system (local > stage > live) instead of developing directly on a live server. Which is what WP is set up to do and which is ridiculous.
/* Lets not rely on paths in the database, they can be very wrong when moving between dev/stage/live environments */
/* The following two variables are backward to my thinking, but hey, what ya gonna do? */
define('WP_HOME', 'http://' . $_SERVER['HTTP_HOST'] . ''); // This is NOT the 'wordpress admin area' home, but the site's home
define('WP_SITEURL', 'http://' . $_SERVER['HTTP_HOST'] . '/SECRETDIRECTORY'); // This isn't the site's URL but the WordPress admin area URL
/* MySQL settings */
switch($_SERVER['SERVER_NAME']){
// Your local machine's settings
case 'mysite.local':
define('DB_NAME', 'dev_mysite');
@uhlhosting
uhlhosting / debian_upgrade.yml
Created March 5, 2018 13:00 — forked from maethor/debian_upgrade.yml
Ansible playbook to update and upgrade Debian hosts
---
- hosts: all
sudo: yes
tasks:
- name: Update packages list
apt: update_cache=yes
when: ansible_os_family == 'Debian'
- name: List packages to upgrade (1/2)

Installing Kubernetes on Proxox

For this example i shall be using a dedicated server from Hertzner.https://www.hetzner.de/en/. A shout out to hetzner if your looking for cheap and beefy dedicated hosting then these guys are your best bet.

Setting up the Hertzer server

This guide assumes your server has Debian 8 (Jessie installed)

Config when tested

@uhlhosting
uhlhosting / dynmotd
Created July 6, 2017 01:33 — forked from cha55son/dynmotd
RHEL (Centos/Fedora) dynamic motd
#!/bin/bash
# Installation:
#
# 1. vim /etc/ssh/sshd_config
# PrintMotd no
#
# 2. vim /etc/pam.d/login
# # session optional pam_motd.so
#