Skip to content

Instantly share code, notes, and snippets.

View sistematico's full-sized avatar
🎯
Focusing

Lucas Brum sistematico

🎯
Focusing
View GitHub Profile
@irgendwr
irgendwr / phpmyadmin.conf
Created March 25, 2019 16:00
Nginx snippet for serving phpmyadmin in a custom subdirectory
location /pma {
alias /usr/share/phpmyadmin;
try_files $uri $uri/ @pma =404;
location ~ \.php$ {
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $request_filename;
fastcgi_pass unix:/var/run/php/php7.2-fpm.sock; # <-- change this to fit your installation
}
}
@zmts
zmts / vue_nginx.md
Last active September 26, 2024 14:44
Deploy Vue.js on custom route via NGINX

Deploy Vue.js on custom route via NGINX

Необходимо реализовать такой роутинг через NGINX

  • /a/* (user dashboard, SPA/Vue.js)
  • /* (все кроме /a/* тулит на proxy pass в Nuxt SSR)

Конфиг NGINX'a

map $sent_http_content_type $expires {
    "text/html" epoch;
@r-malon
r-malon / monokai.md
Created February 27, 2019 19:15
Monokai colors in RGB and HEX format, taken from Sublime Text 3

Monokai Colors in RGB and HEX format


  • Background: (46, 46, 46); #2e2e2e
  • Comments: (121, 121, 121); #797979
  • White: (214, 214, 214); #d6d6d6
  • Yellow: (229, 181, 103); #e5b567
  • Green: (180, 210, 115); #b4d273
  • Orange: (232, 125, 62); #e87d3e
  • Purple: (158, 134, 200); #9e86c8
@cburmeister
cburmeister / liquidsoap.liq
Created October 4, 2018 16:59
An example `liquidsoap` configuration file with two input streams and two output streams to `icecast`.
#!/usr/bin/liquidsoap
# Activate the live stream input
set('harbor.bind_addr', '0.0.0.0')
# Configure input A
input_a = input.harbor(
'input_a',
port=8001,
password='bigproblem'
location / {
index index.html;
root /usr/share/kiwiirc/;
}
location /webirc/ {
# Forward incoming requests to local webircgateway socket
proxy_pass http://127.0.0.1:7778/webirc/;
# Set http version and headers
proxy_http_version 1.1;
@alxbbarbosa
alxbbarbosa / Conexao.php
Created June 27, 2018 21:03
Apresentação do código de exemplo MVC para o Blog
<?php
class Conexao
{
private static $conexao;
private function __construct()
{}
public static function getInstance()
@AoiYamada
AoiYamada / certbot setup guideline.md
Last active January 2, 2023 18:16
Certbot auto renew SSL guideline for CentOS 6, 7

Certbot auto renew SSL guideline for CentOS 6, 7

Sign a ssl cert and renew by cronjob.

Prerequisite

softwares:

  • wget
  • nginx
  • nano
@zanculmarktum
zanculmarktum / megafetch.sh
Last active August 3, 2025 21:32
Get download url from mega.nz
#!/bin/bash
# Copyright 2018, 2019, 2020 Azure Zanculmarktum
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
# permitted provided that the following conditions are met:
#
# 1. Redistributions of this script must retain the above copyright
# notice, this list of conditions and the following disclaimer.
@proprietary
proprietary / mnt-mymountpoint.mount
Created April 12, 2018 13:25
systemd automount sshfs: how to automatically mount a remote sshfs filesystem with systemd
# Change the relevant {{ PARTS OF THIS FILE }} for your remote address etc.
# Make sure this unit file is named similarly to your mountpoint; e.g., for /mnt/mymountpoint name this file mnt-mymountpoint.mount
# On Ubuntu:
# $ sudo cp mnt-mymountpoint.mount /lib/systemd/system/
# $ sudo systemctl enable mnt-mymountpoint.mount
# $ sudo systemctl start mnt-mymountpoint.mount
# On Fedora:
# $ sudo cp mnt-mymountpoint.mount /etc/systemd/system
# $ sudo systemctl enable mnt-mymountpoint.mount
# $ sudo systemctl start mnt-mymountpoint.mount
@diffficult
diffficult / installing_virt_manager.md
Last active July 27, 2025 20:46
Easy instructions to get virt-manager qemuv/kvm running on Arch

Easy instructions to get QEMU/KVM and virt-manager up and running on Arch

  1. Make sure your cpu support kvm with below command:

     grep -E "(vmx|svm)" --color=always /proc/cpuinfo
    
  2. Make sure BIOS have enable “Virtualization Technology”.

  3. User access to /dev/kvm so add your account into kvm(78) group: