Skip to content

Instantly share code, notes, and snippets.

View privatehosting's full-sized avatar

PrivateCityHosting privatehosting

View GitHub Profile
@privatehosting
privatehosting / WindowsUpdateRemoveReplacedUpdate.ps1
Created October 19, 2019 21:34
PowershellScript to remove replaced or declined updates ...
[reflection.assembly]::LoadWithPartialName("Microsoft.UpdateServices.Administration")
$wsus = [Microsoft.UpdateServices.Administration.AdminProxy]::GetUpdateServer();
$wsus.GetUpdates() | Where {$_.IsDeclined -eq $true} | ForEach-Object {$wsus.DeleteUpdate($_.Id.UpdateId.ToString()); Write-Host $_.Title removed }
@privatehosting
privatehosting / php_mdb.rst
Created November 29, 2017 02:32 — forked from amirkdv/php_mdb.rst
How to handle MS Access MDB files in Linux with PHP5 PDO and ODBC

To be able to use PHP5 PDO with MS Access mdb files the following is required (the same applies for the PHP4 style of using odbc_X except for the obviously PDO specific requirements):

PHP ODBC module

In Linux this is achieved by intalling the php5-odbc package:

allow_call_time_pass_reference = Off
allow_url_fopen = On
asp_tags = Off
disable_classes =
disable_functions = curl_multi_exec,exec,parse_ini_file,passthru,popen,proc_close,proc_get_status,proc_nice,proc_open,proc_terminate,shell_exec,show_source,system
display_errors = Off
;display_errors = On
display_startup_errors = Off
enable_dl = Off
error_reporting = E_ALL & ~E_NOTICE
@privatehosting
privatehosting / .gitignore
Last active February 15, 2016 08:00
letsencrypt-froxlor-addon
sftp-config.json
@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!
/*
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 / 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 ..."
@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,
<?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));
#!/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])) {