Skip to content

Instantly share code, notes, and snippets.

View ithoq's full-sized avatar

Ithoq Projosasmito ithoq

  • KENDIL.COM
  • Yogyakarta, Indonesia
View GitHub Profile
@zidenis
zidenis / 5_steps_for_creating_templates_and_vms_on_proxmox_using_linux_distros_cloud_images.md
Last active July 3, 2024 14:13
Creating Templates and Virtual Machines on Proxmox using cloud images from various Linux distributions.

5 Steps for Creating Templates and Virtual Machines on Proxmox using Linux Distro's Cloud Images

This tutorial guides you through the process of creating Templates and Virtual Machines on Proxmox using cloud-based images from various Linux distributions. We provide clear instructions for Alma Linux 9, Amazon Linux 2, CentOS 9, Fedora 38, Oracle Linux 9, RHEL 9, Rocky Linux 9, and Ubuntu 23.04 Lynx Lobster.

Note: The instructions have been tested on Proxmox 8.0.4.

Let's begin by choosing the cloud-based image. If you already have your preferred Linux distribution, skip to the 1st step.

To assist in making informed choices when selecting a Linux distribution for your virtual machines, we've compiled a table showcasing key characteristics of each cloud image. This table provides a snapshot of important attributes, including kernel version, Python version, number of processes initialized after boot, number of packages installed, free memory after boot, VM disk size, root partition disk size, used size on t

@anzz1
anzz1 / whois.php
Last active July 6, 2024 03:06
whois.php
<?php
/* Simple PHP WHOIS (PHP >= 4.0) */
/* https://gist.github.com/anzz1 */
/* --------------------- CONFIGURATION --------------------- */
// Clean up comments ('#', '%') and empty lines from the response
$NO_COMMENTS = false;
@drajathasan
drajathasan / lbc_installer.php
Last active June 18, 2021 06:55
LBC Installer
<?php
/**
* @author Drajat Hasan
* @email drajathasan20@gmail.com
* @create date 2020-08-15 08:39:32
* @modify date 2021-06-18 08:39:32
* @license GPL v3
*/
// Source https://subinsb.com/php-download-extract-zip-archives/
@alexander-young
alexander-young / functions.php
Created January 15, 2020 20:07
Allow SVGs in WordPress media library
function upload_svg_files( $allowed ) {
if ( !current_user_can( 'manage_options' ) )
return $allowed;
$allowed['svg'] = 'image/svg+xml';
return $allowed;
}
add_filter( 'upload_mimes', 'upload_svg_files');
@New0
New0 / cf-show-pro-ui.php
Last active January 26, 2023 00:49
Show Pro settings in Caldera Forms if disconnected ( this can be activated as a WordPress plugin using the Download Zip button )
<?php
/**
* Plugin Name: CF Show Pro UI
* Description: Show Caldera Forms pro settings
* Author: Caldera Forms
**/
//Force Pro settings to show
add_filter('caldera_forms_show_pro_ui', '__return_true');
@tsungtwu
tsungtwu / nginx_reverse_proxy.md
Created November 27, 2019 04:51 — forked from KavenTheriault/nginx_reverse_proxy.md
Configure Nginx Reverse Proxy as failover

Configure Nginx Reverse Proxy as failover

In this exemple of configuration, if the first server fail (proxy_connect_timeout) one time (max_fails), the second server will be used for 60s (fail_timeout).

The SSL certificate need to be configure on the ReverseProxy server AND the proxyied servers. You can use the same certificate and configurations on all servers.

To test the configuration you can change your host file to simulate the correct domain name.

Use the following tool to configure SSL with optimal configuration.

@ianmustafa
ianmustafa / 0-preface.md
Last active May 8, 2024 13:57
PHP: cURL vs file_get_contents

PHP: cURL vs file_get_contents()

This is a very often asked question among PHP developers. This gist aims to answer it.

Case study

RajaOngkir API.

Benchmark

  • Done in DigitalOcean, cheapest droplet ($5), located in Singapore, using Ubuntu Server 18.04.3. (Referral link for anybody interested.)
  • System configured with (mostly) default configuration, using what's available from the package installation.
@chriswayg
chriswayg / create-cloud-template.sh
Last active May 1, 2024 20:47
This script will download a cloud image of many Linux distros and create a Proxmox 6 KVM template from it.
#!/bin/bash
set -o errexit
clear
printf "\n*** This script will download a cloud image and create a Proxmox VM template from it. ***\n\n"
### HOW TO USE
### Pre-req:
### - run on a Proxmox 6 server
### - a dhcp server should be active on vmbr1
@virbo
virbo / proxy.inc
Last active October 24, 2023 03:14
Nginx Reverse Proxy for PDDIKTI Feeder (Linux version)
# More info here: http://wiki.nginx.org/HttpProxyModule
# Source from Centos Web Panel
proxy_buffering off;
proxy_connect_timeout 59s;
proxy_send_timeout 600;
proxy_read_timeout 600;
proxy_buffer_size 64k;
proxy_buffers 16 32k;
proxy_busy_buffers_size 64k;