Skip to content

Instantly share code, notes, and snippets.

@szydan
szydan / gist:ea1de57bc346272092dba9fe8ecaca7a
Created January 18, 2023 12:23
list dependencies yarn2
yarn info
@szydan
szydan / gist:26189ab8bff0d3a873b2d8a1d4a96007
Created January 7, 2023 13:00
record voice with ffmpeg and blackhole audio driver
# Get input channel number for BlackHole device
ffmpeg -f avfoundation -list_devices true -i ""
# Record 2 seconds from i.e. input channel 0
ffmpeg -loglevel debug -f avfoundation -i :0 -t 2 test.mp3
https://github.com/ExistentialAudio/BlackHole
@szydan
szydan / gist:1fe609e3c35026f4a0a24f1f9e4b1dbc
Last active December 18, 2022 20:36
Writing jenkins pipeline tricks
Gradle does not like the $ sign innside the doubel quotes
So it is better to enclose the content of the scripts in ''' ''' instead of """ """
or use ${varName} instear of $varName
npm install -g yarn@berry
yarn --immutable
@szydan
szydan / gist:58245338ce4163edc189a6decfeae34a
Created September 26, 2022 20:34
To install and switch java and more
https://sdkman.io
@szydan
szydan / gist:01b946e7774c564b35709b4fe2e546a4
Last active April 16, 2024 08:19
Ho to locally debug IT test in kubernetes
How to connect to paused pod running IT tests
make sure no other process is running on 5606 locally
Find the id of the pod and run
kubectl -n jenkins get pods
kubectl -n jenkins port-forward pr-investigate-pr-17131-12-fc1z0-3nzrp-1r2n4 5606:5606
@szydan
szydan / parameter_properties_typescript.md
Created June 30, 2022 12:19
parameter properties typescript

Instead of

class A {
  private p1: string;
  
  constructor(p1: string) {
    this.p1 = p1;
  }
}
@szydan
szydan / gist:f60804a6e2ae7762e0b8fdfd54f46b11
Created May 23, 2022 10:04
Execute http request selenium async
response = driver.execute_async_script("""
var done = arguments[0];
function reqListener () {
done(this.responseText);
}
var oReq = new XMLHttpRequest();
oReq.addEventListener("load", reqListener);
oReq.open("POST", "https://s12.volatile.siren.io/investigate-access-control/api/v1/auth/info");
const testHEAD = function(url) {
var xmlhttp = new XMLHttpRequest();
xmlhttp.open("HEAD", url, true);
xmlhttp.onreadystatechange=function() {
if(xmlhttp.readyState==4) {
console.log(xmlhttp.getAllResponseHeaders());
}
}
xmlhttp.send(null);
}