Skip to content

Instantly share code, notes, and snippets.

View levelKro's full-sized avatar
🏠
Working from home

levelKro levelKro

🏠
Working from home
View GitHub Profile
@levelKro
levelKro / iptables-rules.sh
Created February 4, 2019 11:31
Basic IPTables rules
# Add rules for allow; Webmin, Smtp, Pop, FTP, SSH, HTTP, RTMP (Red5), Proxy
# And with form normal, ssl, tls ports
# Just copy and past in command prompt and reload iptables
# Basic ports
iptables -A INPUT -p udp -m udp --dport 20 -j ACCEPT
iptables -A INPUT -p udp -m udp --dport 21 -j ACCEPT
iptables -A INPUT -p tcp -m tcp --dport 20 -j ACCEPT
iptables -A INPUT -p tcp -m tcp --dport 21 -j ACCEPT
iptables -A INPUT -p tcp -m tcp --dport 22 -j ACCEPT
@levelKro
levelKro / install-ffmpeg.sh
Created February 4, 2019 11:33
FFMpeg Install CentOS X64 (v7)
#!/bin/bash
yum update
yum install autoconf automake bzip2 cmake freetype-devel gcc gcc-c++ git libtool make mercurial pkgconfig zlib-devel
mkdir ~/ffmpeg_sources
cd ~/ffmpeg_sources
wget http://www.nasm.us/pub/nasm/releasebuilds/2.13.02/nasm-2.13.02.tar.bz2
tar xjvf nasm-2.13.02.tar.bz2
cd nasm-2.13.02
@levelKro
levelKro / virtualmin-dns.php
Created February 4, 2019 11:40
PHP Virtualmin Class for add/update/delete DNS
<?php
error_reporting(E_ALL & ~E_NOTICE & ~E_STRICT);
ini_set("display_errors", 1);
/*
Virtualmin API Class v1.0
Mathieu Légaré
levelkro@yahoo.ca
https://levelkro.net
@levelKro
levelKro / steam.php
Created February 4, 2019 11:43
PHP Steam Class (simple reply and use)
<?php
/*
* (c) Copyright Mathieu Légaré (levelkro@yahoo.ca)
* 2013-2019
*/
class SteamLVK {
/* Variables */
const STEAM_LOGIN = 'https://steamcommunity.com/openid';
const STEAM_OPENID = 'http://specs.openid.net/auth/2.0';
const STEAM_COMMUNITY = 'https://steamcommunity.com';
@levelKro
levelKro / barcode.php
Last active December 19, 2021 20:20
Script for Bar Code support in PHP
<?php
/*
* Author David S. Tufts
* Company davidscotttufts.com
*
* Date: 05/25/2003
* Usage: <img src="/barcode.php?text=testing" alt="testing" />
*
* Code 128 edited with a loop for adding Function Key feature in the code