This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Public Sub AddFilter(ByVal p_strNameOfRemoteTable As String, ByVal p_strWhereClause As String) | |
Dim db As Database | |
Dim td As TableDef | |
Dim propFilter As Object | |
Set db = CurrentDb() | |
Set td = db.TableDefs(p_strNameOfRemoteTable) | |
With td | |
' Enforce table to load data with filter (This property is promised to be exists) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Write-Host "Encrypt folder with GnuPG." | |
Write-Host "Itamar 2021-11-17" | |
$gpgExeLocaiton = "C:\Program Files (x86)\GnuPG\bin\gpg.exe" | |
$inputFolder = "C:\Temp\origin" | |
$outputFolder = "C:\temp\output" | |
$recipientEmail = "[email protected]" | |
if ([string]::IsNullOrEmpty("$inputFolder") -or -not (Test-Path -Path "$inputFolder" -PathType Container)){ | |
Write-Error "input folder does not exist." | |
exit 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# self elevate this script to run as admin | |
if (!([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator")) { | |
Start-Process powershell.exe "-NoProfile -ExecutionPolicy Bypass -File `"$PSCommandPath`"" -Verb RunAs; exit | |
} | |
$newCertContent = "# Certificate name for easy search | |
-----BEGIN CERTIFICATE----- | |
MIITHISISMYCERT_hereBeDragonshereBeDragons | |
-----END CERTIFICATE----- | |
" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#requires -version 4.0 | |
[cmdletbinding()] | |
Param([Parameter(Position=0,ValueFromPipeline,ValueFromPipelineByPropertyName)] | |
[string]$Path ) | |
Process { | |
Write-verbose "Creating hash for input file..." | |
$hash = (Get-FileHash -Path $Path -Algorithm "SHA256").Hash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Enable -Verbose option | |
[CmdletBinding()] | |
Param( | |
[string]$dllsFolder = "$PSScriptRoot", | |
[string]$txtWithFileList = "$PSScriptRoot\ListOfFilesToUseInThemida.txt", | |
[string]$themida32Path = "C:\Program Files\Themida\Themida.exe", | |
[string]$themidaProject = "D:\ThemidaProject.tmd", | |
[int]$totalProcesses = 8 | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Runtime.InteropServices; | |
using System.Windows.Interop; | |
namespace HostingAppTest | |
{ | |
// based on https://stackoverflow.com/q/30186930/426315 | |
public class HwndHostEx : HwndHost | |
{ | |
private readonly IntPtr _childHandle; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Window x:Class="TabletKeyboardAutoOpen.MainWindow" | |
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | |
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | |
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | |
xmlns:local="clr-namespace:TabletKeyboardAutoOpen" | |
mc:Ignorable="d" | |
FontSize="30" | |
Title="MainWindow" | |
WindowStartupLocation="CenterScreen" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ---------------------------------------------------- | |
// Notice, this code is using BouncyCastle NuGet: | |
// https://www.nuget.org/packages/BouncyCastle/1.8.4/ | |
// Created by: Itsho | |
// Creation Date: 20 December 2018 | |
// ---------------------------------------------------- | |
using Org.BouncyCastle.Asn1.Pkcs; | |
using Org.BouncyCastle.Crypto; | |
using Org.BouncyCastle.Crypto.Generators; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ========================================================================================================= | |
# if you like to reset your DPI Scaling to the DEFAULT, you can use the registry (Option five) from here: | |
# https://www.tenforums.com/tutorials/5990-change-dpi-scaling-level-displays-windows-10-a.html#option5 | |
# | |
# But, since the default value is different on various monitors, if you like to force 100%, | |
# you need the following trick: | |
# for each monitor - set DPIValue to 0xFFFFFFFF (which is -1 in DWord) | |
# | |
# Last update: 18 December 2018 | |
# Created by: Itsho |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ----------------Compare versions - start ------------------ | |
// source: http://www.arvydas.co.uk/2015/04/compare-version-strings-with-innosetup/ | |
// Procedure to split a string into an array of integers | |
procedure Explode(var Dest: TArrayOfInteger; Text: String; Separator: String); | |
var | |
i, p: Integer; | |
begin | |
i := 0; | |
repeat | |
SetArrayLength(Dest, i+1); |
NewerOlder