Skip to content

Instantly share code, notes, and snippets.

View privatehosting's full-sized avatar

PrivateCityHosting privatehosting

View GitHub Profile
@privatehosting
privatehosting / fun.php
Last active October 7, 2015 14:28
This is a Command Test. I wanted to test some cmd - routines. This Code is from 2009
<?php
define("DEBUG", cmd_exists("--debug"));
cmd_echo("Ein Aus langeweile gemachter Script!");
$eingabe = false;
while(strstr(strtolower($eingabe),"fu") == FALSE)
{
if($eingabe != false) {
cmd_echo ("Deine Angabe: {$input} ist falsch! Versuch es erneut!");
}
<?php
/**
* @param GetAlphapet
* @link http://www.asciitable.com/
* @author 2010 PrivateCityPage
* @author 2014 Dominik Pilichiewicz
*/
function getNextABC($gbuchstabe = false)
@privatehosting
privatehosting / function.IsValideEmail.php
Created April 25, 2014 00:25
Nachfrage ob eMail Adresse Valide ist und ob der Mail Server auch in der Domain Eingetragen wurde.
<?php
function IsValideEmail($email)
{
//$email = strtolower($email); ;; Groß und Kleinschreibung wird im eMail Verkehr berücksichtigt.
$return = false;
if(filter_var($email, FILTER_VALIDATE_EMAIL))
{
list($user, $host) = explode("@", $email);
if(checkdnsrr($host, "A") && checkdnsrr($host, "MX"))
{
#!/usr/bin/php -q
<?php
if(isset($argv[0]) && isset($argv[1]))
{
$opt_use = 0;
$dir_use = 0;
if(file_exists($argv[1])) {
$opt_use = 1;
$dir_use = ($argv[1]);
} elseif(file_exists(getcwd().$argv[1])) {
<?php
// Array Erstellen - Am ende, des Arrays, das Komma nicht vergessen.
$banner_array = array(
1 => array("Link"=>"http://test.de","Bild"=>"./images.png","Name"=>"Test"),
2 => array("Link"=>"http://test.de","Bild"=>"./images.png","Name"=>"Lol")
);
// Banners werden Gezählt
$banner = rand(1,count($banner_array));
@privatehosting
privatehosting / ajax-dynamic-content.js
Last active February 14, 2016 08:52
Portscanner Vorsicht: Verwendung auf eigene Gefahr. Das Scannen von IP Adressen sowie der zugehörigen Port kann gegebenenfalls in ihrem Land Illegal sein.
/************************************************************************************************************
Ajax dynamic content
Copyright (C) 2006 DTHMLGoodies.com, Alf Magne Kalleland
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
@privatehosting
privatehosting / WindowsUpdateRemoval.ps1
Last active August 29, 2015 14:07
PowerShell Script to Remove Bad Windows Updates
$kbs = @(2975719,2975179,2977174,2982791,2984006,2993651,2994897,2995004,2995005)
$kbSearch = "KB" + ($kbs -join " OR KB")
foreach($kb in $kbs)
{
$remKbCmd = "wusa.exe /uninstall /kb:$kb /quiet /log /norestart"
Write-Host "Uninstalling KB$kb with '$remKbCmd'"
Invoke-Expression -Command $remKbCmd;
Write-Host "Waiting for KB$kb removal to finish ..."
/*
Array LoL
der BIS20A vom 02 März 2015: Revision: A - Alpha
*/
#include <stdio.h> // Präprozessor - Direktive für das einsetzen der Datei Stdio.h
// std = Standart, io = input/output, .h = Header-Datei
// noetig um die vorgefertigte funktion printf() zu benutzen
// = Kommentar bis Zeilenende
#include <stdlib.h> // Standart Bibliothek
@privatehosting
privatehosting / aufgabe1.cpp
Created June 8, 2015 09:51
Klassen Arbeit 2
#include<stdio.h>
#include<stdlib.h>
#include<conio.h>
int main()
{
// Init der Variablen
int summen_ungerade_zahlen = 0; // Variable für die Summen der Ungeraden Zahlen
int i = 0; // Variable, zum zählen der Zahlen bis 100.
while(i <= 100) // While Schleife, welche darauf achten Soll, dass die Zahlen von 0 bis 100 eingehlten werden!
@privatehosting
privatehosting / .gitignore
Last active February 15, 2016 08:00
letsencrypt-froxlor-addon
sftp-config.json