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 / glibc-2.17_centos6.sh
Created November 15, 2021 13:44 — forked from harv/glibc-2.17_centos6.sh
update glibc to 2.17 for CentOS 6
#! /bin/sh
# update glibc to 2.17 for CentOS 6
wget http://copr-be.cloud.fedoraproject.org/results/mosquito/myrepo-el6/epel-6-x86_64/glibc-2.17-55.fc20/glibc-2.17-55.el6.x86_64.rpm
wget http://copr-be.cloud.fedoraproject.org/results/mosquito/myrepo-el6/epel-6-x86_64/glibc-2.17-55.fc20/glibc-common-2.17-55.el6.x86_64.rpm
wget http://copr-be.cloud.fedoraproject.org/results/mosquito/myrepo-el6/epel-6-x86_64/glibc-2.17-55.fc20/glibc-devel-2.17-55.el6.x86_64.rpm
wget http://copr-be.cloud.fedoraproject.org/results/mosquito/myrepo-el6/epel-6-x86_64/glibc-2.17-55.fc20/glibc-headers-2.17-55.el6.x86_64.rpm
sudo rpm -Uvh glibc-2.17-55.el6.x86_64.rpm \
@bst2002git
bst2002git / xenmigrate.py
Created May 3, 2022 09:27 — forked from miebach/xenmigrate.py
xenmigrate - convert a Citrix *.xva file to a XEN *.img file.
"""
Original Location: http://www.robotics.net/wp-content/uploads/xenmigrate.py
Quote from the Documentation: http://www.robotics.net/2009/06/06/converting-citrix-xva-to-xenorg-img/ :
'The file formats of the commercial and open source Xen are totally different.
The open source is a standard image file, you can mount it, fdisk it, whatever you would like.
The Citrix Xen Virtual Appliance .XVA file is quite different. It is actually a tar file
with ova.xml meta data and directories starting with Ref full of 1M files that make up the
rive volumes of the virtual image.
@bst2002git
bst2002git / index.php
Created December 6, 2022 16:04
[magento] multidomain-multistore-multistoreview setup with visible language codes

Use these snippets to setup a magento installation with the following structure:

@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
@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)
<?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
<?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/';
?>
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.
@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>
@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) {