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 / 500-error-log-file-stack-trace-animation.markdown
Created January 17, 2022 06:59
500 Error: Log File / Stack Trace Animation

500 Error: Log File / Stack Trace Animation

This weeks code-doodle is just a little 500 error page mockup. Tried to capture the feeling of going through stack traces and lines and lines of log-files in an aesthetically pleasing way. -- wanted to mess around with css variables so likely doesn't work too well in ie :)

A Pen by Adam Quinlan on CodePen.

License.

@uhlhosting
uhlhosting / automatic-table-of-contents.markdown
Created January 17, 2022 06:55
Automatic Table of Contents

Automatic Table of Contents

Just a little JS snippet that I developed for a colleague. They had an internal wiki and needed a way to automatically generate a simple table of contents in a certain format (1, 1.1, 1.1.1 etc) automatically based on the header tags. No style yet but this was a fun one.

A Pen by Adam Quinlan on CodePen.

License.

@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)