Skip to content

Instantly share code, notes, and snippets.

View jozefizso's full-sized avatar
🏳️‍🌈

Jozef Izso jozefizso

🏳️‍🌈
  • Slido, Cisco Systems
  • Bratislava, Slovakia
View GitHub Profile
@jozefizso
jozefizso / main.c
Created October 26, 2013 13:19
Simple C program for reading user input and writing it out as number codes.
//
// main.c
// Platform: OS X 10.9
//
// Created by Jozef Izso on 26.10.2013.
// Copyright (c) 2013 Jozef Izso. All rights reserved.
//
#include <stdio.h>
#include <stdlib.h>
@jozefizso
jozefizso / shell.sh
Created April 10, 2014 21:29
WebSupport SMTP TLS Certificate
> openssl s_client -connect smtp.websupport.sk:25 -starttls smtp
CONNECTED(00000003)
depth=0 /OU=Domain Control Validated/CN=*.websupport.sk
verify error:num=20:unable to get local issuer certificate
verify return:1
depth=0 /OU=Domain Control Validated/CN=*.websupport.sk
verify error:num=27:certificate not trusted
verify return:1
depth=0 /OU=Domain Control Validated/CN=*.websupport.sk
verify error:num=21:unable to verify the first certificate
var sendFile = function (file, chunkSize)
{
var start = 0,
end = Math.min(chunkSize, file.size),
retryCount = 0,
sendNextChunk, fileChunk;
displayStatusMessage("");
sendNextChunk = function ()
{
fileChunk = new FormData();
@jozefizso
jozefizso / FUCK_OWA_O365.html
Created September 2, 2014 15:01
Fucking OWA O365 FUCK Fucking fuck
<font face="Times New Roman,serif" size="3">
<span style="font-size:12pt;">
<font face="Segoe UI,sans-serif" size="5" color="#B61318">
<span style="font-size:18pt;">Vážený klient,</span>
</font>
</span>
</font>
@jozefizso
jozefizso / 0_reuse_code.js
Last active August 29, 2015 14:10
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@jozefizso
jozefizso / WsusDbMaintanance.sql
Last active October 1, 2019 08:46
WSUS Database Maintenance
/******************************************************************************
This sample T-SQL script performs basic maintenance tasks on SUSDB
1. Identifies indexes that are fragmented and defragments them. For certain
tables, a fill-factor is set in order to improve insert performance.
Based on MSDN sample at http://msdn2.microsoft.com/en-us/library/ms188917.aspx
and tailored for SUSDB requirements
2. Updates potentially out-of-date table statistics.
******************************************************************************/
USE SUSDB;
@jozefizso
jozefizso / Product.wxs
Last active August 29, 2015 14:23
WIX Utility Scripts for Installer Projects
<?xml version="1.0" encoding="utf-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<?include $(sys.CURRENTDIR)Runtime.wxi ?>
<Product Id="*">
<Upgrade Id="$(var.UpgradeCode)">
<UpgradeVersion Property="OLDERVERSION_BEINGUPGRADED" Minimum="0.0.0" Maximum="$(var.ProductVersion)" IncludeMaximum="no" />
<UpgradeVersion Property="NEWERVERSION_INSTALLED" OnlyDetect="yes" Minimum="$(var.ProductVersion)" IncludeMinimum="no" />
</Upgrade>
<InstallExecuteSequence>
@jozefizso
jozefizso / udf_FormatBytes.sql
Created November 3, 2015 13:09
Convert Bytes to KB, MB, GB, TB, PB or EB and format the output to human readable format
CREATE FUNCTION [dbo].[udf_FormatBytes]
(
@InputNumber DECIMAL(38,7),
@InputUOM VARCHAR(5) = 'Bytes'
)
RETURNS VARCHAR(20)
WITH SCHEMABINDING
AS
BEGIN
-- Declare the return variable here
@jozefizso
jozefizso / symbols.cmd
Created November 24, 2015 09:26
Windows Symbols
@echo off
md c:\Symbols
md c:\Symbols\Sym
md c:\Symbols\SymCache
compact /c /s /i /q c:\Symbols\Sym\
compact /c /s /i /q c:\Symbols\SymCache\
setx /m DBGHELP_HOMEDIR C:\Symbols
setx /m _NT_SYMBOL_PATH SRV*C:\Symbols\Sym*http://msdl.microsoft.com/download/symbols
setx /m _NT_SYMCACHE_PATH C:\Symbols\SymCache
@jozefizso
jozefizso / README.md
Created December 11, 2015 21:23
PowerShell build number functions

PowerShell build number functions

Based on algorithm from Visual Studio for generating the major and minor parts of the build number.

Major build number 0.0.X.0 is number of days since January 1st, 2000. Minor build number (the revision component 0.0.0.Y) is number of seconds since midnight divided by 2.