Skip to content

Instantly share code, notes, and snippets.

View bst2002git's full-sized avatar
💭
Cafè del Mar

bst2002git

💭
Cafè del Mar
View GitHub Profile
@bst2002git
bst2002git / mount_xen_vdi.md
Created October 22, 2024 10:06 — forked from r4um/mount_xen_vdi.md
Mount disk under Xen dom0
  • Get name label and hypervisor of the disk, login to the hypervisor
# xe vdi-list name-label=ROOT-892
uuid ( RO)                : 5948fee1-28a4-4d37-a38d-cda7527b366d
          name-label ( RW): ROOT-892
    name-description ( RW):
             sr-uuid ( RO): d3a28e40-b840-556a-596f-e5e8412edd81
        virtual-size ( RO): 289910292480
            sharable ( RO): false
@bst2002git
bst2002git / java_download.sh
Created April 29, 2024 10:09 — forked from wavezhang/java_download.sh
download java from oracle without login
wget -c --no-cookies --no-check-certificate --header "Cookie: oraclelicense=accept-securebackup-cookie" https://download.oracle.com/otn-pub/java/jdk/12.0.2+10/e482c34c86bd4bf8b56c0b35558996b9/jdk-12.0.2_linux-x64_bin.tar.gz
@bst2002git
bst2002git / woocommerce-settings-tab-demo.php
Created March 26, 2024 10:48 — forked from BFTrick/woocommerce-settings-tab-demo.php
A plugin demonstrating how to add a WooCommerce settings tab.
<?php
/**
* Plugin Name: WooCommerce Settings Tab Demo
* Plugin URI: https://gist.github.com/BFTrick/b5e3afa6f4f83ba2e54a
* Description: A plugin demonstrating how to add a WooCommerce settings tab.
* Author: Patrick Rauland
* Author URI: http://speakinginbytes.com/
* Version: 1.0
*
* This program is free software: you can redistribute it and/or modify
@bst2002git
bst2002git / CustomMaintenancePage.vcl
Created August 29, 2023 07:49 — forked from section-io-gists/CustomMaintenancePage.vcl
Varnish 4 - Custom maintenance page
import std;
acl whitelist {
"123.123.123.123";
"216.3.128.12";
}
sub vcl_recv {
# If not a whitelisted IP, then display maintenance page. Requires std library.
if(std.ip(regsub(req.http.X-Forwarded-For, "[, ].*$", ""), client.ip) !~ whitelist) {
@bst2002git
bst2002git / gist:e585024af21915403b075e6a88867269
Created April 14, 2023 08:18 — forked from pitch-gist/gist:2999707
HTML: Simple Maintenance Page
<!doctype html>
<title>Site Maintenance</title>
<style>
body { text-align: center; padding: 150px; }
h1 { font-size: 50px; }
body { font: 20px Helvetica, sans-serif; color: #333; }
article { display: block; text-align: left; width: 650px; margin: 0 auto; }
a { color: #dc8100; text-decoration: none; }
a:hover { color: #333; text-decoration: none; }
</style>
ISPConfig SOAP Remoting API: DNS functions.
Contents:
1. Important Notice.
2. Licensing.
3. Glossary
4. DNS Zone functions
5. AAAA record functions
6. A record functions.
7. CNAME record functions.
<?php
$soapUsername = 'soapusername';
$soapPassword = 'soappassword';
$soap_location = 'https://192.168.122.204:8080/remote/index.php';
$soap_uri = 'https://192.168.122.204:8080/remote/';
?>
<?php
/* authenticate with soap */
require 'soap_config.php';
/* Generate random password */
function randomPassword($max) {
//* http://stackoverflow.com/questions/6101956/generating-a-random-password-in-php
$alphabet = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890';
$pass = array(); //remember to declare $pass as an array
$alphaLength = strlen($alphabet) - 1; //put the length -1 in cache
@bst2002git
bst2002git / Ispconfig3.php
Created January 26, 2023 08:51 — forked from nurulimamnotes/Ispconfig3.php
Integrate Boxbilling to ISPConfig 3
<?php
/**
* BoxBilling Automation for ISPConfig 3
*
* This source file is additional script for Boxbilling to
* integrate automated create client and website for ISPConfig 3
* It is also available through the world-wide-web at this URL:
* https://bits.co.id/boxbilling-auto-ispconfig-3/
*
* @copyright Copyright (c) 2013-2015 Banten IT Solutions (https://bits.co.id)
@bst2002git
bst2002git / Ispconfig3-DNS.php
Created January 26, 2023 08:50 — forked from nurulimamnotes/Ispconfig3-DNS.php
ISPConfig 3 DNS API
<?php
/**
* @author Ben Lake <me@benlake.org>
* @license GNU Lesser Public License v3 (http://opensource.org/licenses/lgpl-3.0.html)
* @copyright Copyright (c) 2011, Ben Lake
* @link http://benlake.org/projects/show/ispconfigclient
*
* This file is part of the ISPConfig PHP Client.
*
* ISPConfig PHP Client is free software: you can redistribute it and/or modify