Skip to content

Instantly share code, notes, and snippets.

View gitfvb's full-sized avatar

Florian von Bracht gitfvb

View GitHub Profile
@gitfvb
gitfvb / readme.md
Last active October 17, 2022 09:47
Install npgsql in PowerShell from Nuget
@gitfvb
gitfvb / LICENSE.txt
Created September 12, 2022 22:16
MIT License for Apteco
MIT License
Copyright (c) 2022 Apteco GmbH
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@gitfvb
gitfvb / README.md
Created August 8, 2022 13:24
Installation of .net connector of Snowflake in Apteco Marketing Software (Designer)

The initial source is nuget. So download the latest nuget.exe from https://dist.nuget.org/win-x86-commandline/latest/nuget.exe and put it into a subdirectory.

Then open PowerShell or cmd, go to that directory of nuget.exe and install the package with all dependencies:

.\nuget.exe install Snowflake.Data

Then you can create a directory for Designer like C:\Program Files\Apteco\FastStats Designer\Providers\snowflake and just put all folders that were downloaded from nuget into that. Next time you are opening Designer you should see Snowflake then.

SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE OR ALTER TRIGGER [dbo].[new_login] on [dbo].[Logins] AFTER INSERT as
--declare @UserName varchar(50);
begin
@gitfvb
gitfvb / readme.md
Last active July 14, 2022 16:27
Incremental Extracts Strategy for Apteco Designer

Sometimes you don't want to load all the data, only smaller pieces to get a better extract performance. Or maybe do a bigger load once a while and then do daily or hourly incremental extracts. Together with discarding extracts (to enforce a reload of fresh and not fixed or finished data), you can create a pretty powerful combination.

To get this done I have experimented with the different options. To do this I have extracted the training data in Designer and loaded it into a SQLITE database (with DB Browser). Then I have configured the following for bookings, because that should be loaded incremental.

  • Custom Query
SELECT *
FROM bookings
@gitfvb
gitfvb / README.md
Last active June 1, 2022 18:41
First steps with Himalaya Matrix Core ESP32
@gitfvb
gitfvb / readme.md
Last active May 11, 2022 07:38
Raspberry Pi (raspi) helpful commands

Deactivate WIFI

Check your current network status with

ifconfig

If your wifi has an ip address, it is still connected and active. Deactivate it temporarily with

@gitfvb
gitfvb / Test-Credential.ps1
Created April 12, 2022 11:42
A script to test if the input credential is valid, because Get-Credential allows everything without validation. This script is maintained here https://github.com/Apteco/HelperScripts/tree/master/functions/Security
function Test-Credential {
[CmdletBinding()]
param (
[Parameter(
Mandatory = $false
,ValueFromPipeLine = $true
#,ValueFromPipelineByPropertyName = $true
)]
@gitfvb
gitfvb / readme.md
Last active March 12, 2022 21:25
Remove unnecessary windows apps, that are not installed by the user

To show all installed apps, use this

Get-AppxPackage -AllUsers * | Out-GridView

or something like

Get-AppxPackage -AllUsers * | Select Name, PackageFullName | ft
@gitfvb
gitfvb / queries.md
Last active January 10, 2022 15:14
Show last executed queries on sqlserver

Show last executed queries on sqlserver

SELECT deqs.last_execution_time AS [Time]
	,dest.TEXT AS [Query]
FROM sys.dm_exec_query_stats AS deqs
CROSS APPLY sys.dm_exec_sql_text(deqs.sql_handle) AS dest
WHERE lower(dest.TEXT) LIKE '%binaries%'
ORDER BY deqs.last_execution_time DESC