Skip to content

Instantly share code, notes, and snippets.

View visch's full-sized avatar

Derek Visch visch

View GitHub Profile
@visch
visch / schema_example_conformed.py
Last active November 19, 2022 19:06
Schema example
from target_postgres.sinks import PostgresSink
from target_postgres.target import TargetPostgres
target = TargetPostgres(config={"sqlalchemy_url":"na"})
schema = {'properties': {'A': {'type': ['string', 'null']}, 'ABORT': {'type': ['string', 'null']}, 'ABS': {'type': ['string', 'null']}, 'ABSENT': {'type': ['string', 'null']}, 'ABSOLUTE': {'type': ['string', 'null']}, 'ACCESS': {'type': ['string', 'null']}, 'ACCORDING': {'type': ['string', 'null']}, 'ACOS': {'type': ['string', 'null']}, 'ACTION': {'type': ['string', 'null']}, 'ADA': {'type': ['string', 'null']}, 'ADD': {'type': ['string', 'null']}, 'ADMIN': {'type': ['string', 'null']}, 'AFTER': {'type': ['string', 'null']}, 'AGGREGATE': {'type': ['string', 'null']}, 'ALL': {'type': ['string', 'null']}, 'ALLOCATE': {'type': ['string', 'null']}, 'ALSO': {'type': ['string', 'null']}, 'ALTER': {'type': ['string', 'null']}, 'ALWAYS': {'type': ['string', 'null']}, 'ANALYSE': {'type': ['string', 'null']}, 'ANALYZE': {'type': ['string', 'null']}, 'AND': {'type': ['s
visch@visch-ubuntu:~/git/playgrounds/file_descriptors$ cat fd3.ps1
Write-Host "Stdout"
visch@visch-ubuntu:~/git/playgrounds/file_descriptors$ pwsh fd3.ps1 > 3
visch@visch-ubuntu:~/git/playgrounds/file_descriptors$ cat 3
Stdout
@visch
visch / JCIFSEngine.java
Created February 14, 2020 17:21 — forked from moberwasserlechner/JCIFSEngine.java
SPNEGO with NTLM is required if you want to authenticate with a MS Dynamics NAV 2009. I'm using various authentication mechanismns from "org.apache.httpcomponents:httpclient:4.2.3". But SPNEGO with NTLM is not supported out of the box. Copiing HttpClient's NTLMScheme and making some changes has done the trick.
import java.io.IOException;
import jcifs.ntlmssp.NtlmFlags;
import jcifs.ntlmssp.Type1Message;
import jcifs.ntlmssp.Type2Message;
import jcifs.ntlmssp.Type3Message;
import jcifs.util.Base64;
import org.apache.http.impl.auth.NTLMEngine;
import org.apache.http.impl.auth.NTLMEngineException;
Vagrant.configure("2") do |config|
config.vm.box = "centos/7"
config.vm.box_version = "1804.02"
end
##Output from Vagrant