Skip to content

Instantly share code, notes, and snippets.

Alexandr Mitev bessangel

View GitHub Profile
@bessangel
bessangel / vncxfer.pl
Created Mar 9, 2018
vncxfer: A CGI script to set up TCP redirection between a VNC Viewer # and VNC Server using the Web Server as a relay point.
View vncxfer.pl
#!/usr/bin/perl
#!/usr/local/bin/perl
#
# vncxfer: A CGI script to set up TCP redirection between a VNC Viewer
# and VNC Server using the Web Server as a relay point.
#
# Copy this to a place on a website where CGI scripts will be run.
# e.g. http://somesite.com/cgi-bin/vncxfer
#
# One user goes to the the above URL and chooses a session name and then
View pFSENSE disable referer
pfSsh.php playback disablereferercheck
#disable ipfw
pfctl -d
@bessangel
bessangel / rules
Last active Oct 13, 2017
shorewall zimbra
View rules
#
# Shorewall version 4 - Rules File
#
# For information on the settings in this file, type "man shorewall-rules"
#
# The manpage is also online at
# http://www.shorewall.net/manpages/shorewall-rules.html
#
######################################################################################################################################################################################################
#ACTION SOURCE DEST PROTO DEST SOURCE ORIGINAL RATE USER/ MARK CONNLIMIT TIME HEADERS SWITCH HELPER
@bessangel
bessangel / GET-VERSION.bat
Created Sep 11, 2017
GET-VERSION.bat - windows system information
View GET-VERSION.bat
@echo on
call :sub > VERSION.log
exit /b
:sub
date /T
set
ver
java -version
@bessangel
bessangel / feedxml-zbozi_cz.php
Last active Jul 21, 2016
Prestashop 1.5 module for seznam zbozi.cz feed.xml generate
View feedxml-zbozi_cz.php
<?php
/*
Prestashop 1.5 module for seznam zbozi.cz feed.xml generate
21.07.2016
Put this file in folder ./modules/feedxml-zbozi_cz
*/
include(dirname(__FILE__).'/../../config/config.inc.php');
require_once(dirname(__FILE__).'/../../init.php');
@bessangel
bessangel / gist:a0e48ffb7b3bf550a6ba
Last active Nov 18, 2015
Google Table - trigger for log timestamp of cell changes
View gist:a0e48ffb7b3bf550a6ba
/**
* Set updatedAt for Popis column
* @autor
* přejmenováno na onEditTrigger a nastaveno přes Zdorje/Spouštěče == zná to i email editora
* @see https://developers.google.com/apps-script/guides/triggers/
*/
function onEdit(e) {
var range = e.range;
// column number
@bessangel
bessangel / slave-dns.sh
Created Sep 29, 2013
Synchronize slave dns zone between bind9 servers
View slave-dns.sh
## slave-dns-reload.sh
#!/bin/bash
cd /etc/bind
MASTERS=`grep "type master" -B1 named.conf.local | perl -ne '/"(.*)"/ && print "$1\n"'`
for i in $MASTERS;do perl -i -pe "if(/zone \"$i\"/){ \$_=''} " slave-zones.conf.tmp ; done
test `diff -w slave-zones.conf slave-zones.conf.tmp | wc -l` -gt 0 && cp slave-zones.conf{.tmp,} && /etc/init.d/bind9 reload
###slave-dns-send.sh
@bessangel
bessangel / mtop
Created Jun 16, 2011
mtop.sh - mysql top
View mtop
#!/bin/bash
if [ ! -z $1 ]; then
export MTOPU="-uroot"
export MTOPPW="-p$1"
fi
if [ -f /root/.my.cnf ]; then
MTOPU=' '
MTOPPW=' '
fi
if [ -z $MTOPU ] && [ -z $MTOPPW] && [ $MTOPU != ' ' ]; then
You can’t perform that action at this time.