Skip to content

Instantly share code, notes, and snippets.

View huksley's full-sized avatar
🐈
Step on no pets

Ruslan Gainutdinov huksley

🐈
Step on no pets
View GitHub Profile
> zbctl --address $CONTACTPOINT_ADDRESS:443 status \
--clientId $CLIENTID --clientSecret $CLIENTSECRET \
deploy detect-faces-zeebe.bpmn
Error: rpc error: code = InvalidArgument desc = Command rejected with code 'CREATE': Expected to deploy new resources, but encountered the following errors:
'detect-faces-zeebe.bpmn': - Element: ErrorEventDefinition_0hgorsz
- ERROR: ErrorCode must be present and not empty
- Element: ErrorEventDefinition_1ropsen
- ERROR: ErrorCode must be present and not empty
- Element: ErrorEventDefinition_13mgmyc
[
{
"$type": "Tfl.Api.Presentation.Entities.Prediction, Tfl.Api.Presentation.Entities",
"id": "-318506459",
"operationType": 1,
"vehicleId": "LTZ1122",
"naptanId": "490014055E",
"stationName": "Victoria Gate",
"lineId": "148",
"lineName": "148",
{
"$type": "Tfl.Api.Presentation.Entities.JourneyPlanner.ItineraryResult, Tfl.Api.Presentation.Entities",
"journeys": [
{
"$type": "Tfl.Api.Presentation.Entities.JourneyPlanner.Journey, Tfl.Api.Presentation.Entities",
"startDateTime": "2020-01-22T12:50:00",
"duration": 57,
"arrivalDateTime": "2020-01-22T13:47:00",
"legs": [
{
@huksley
huksley / disabling-photoanalysisd.md
Last active April 10, 2025 04:50
Disabling photoanalysisd

For what it's worth (and with all the usual disclaimers about potentially making your mac unstable by disabling system services), here's some commands that will manipulate this service and services like it. Note the $UID in the command, that's just a bash shell variable that will resolve to some number. That's your numeric UID. You just run these commands from a Terminal command line. No special privileges needed.

If you want to disable it entirely, the first command stops it from respawning, and the second kills the one that is currently running:

launchctl disable gui/$UID/com.apple.photoanalysisd
launchctl kill -TERM gui/$UID/com.apple.photoanalysisd

(If you kill it without disabling it will die, but a new one will respawn and pick up where the old one left off)

#!/bin/bash
if [[ -w "$1" ]]; then
mcedit "$1"
else
sudoedit "$1"
fi
@huksley
huksley / vscodium.desktop
Last active September 26, 2019 21:29
VSCodium linux desktop shortcut.
[Desktop Entry]
Version=1.0
Type=Application
Name=VSCodium
Icon=vscodium
Exec=code
Terminal=false
StartupNotify=false
menuentry "Rescue Ubuntu 18.04 LiveCD" {
set isoname="/ubuntu-18.04.3-desktop-amd64.iso"
search --label --set rescue rescue
loopback loop ($rescue)$isoname
linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=$isoname quiet splash
initrd (loop)/casper/initrd
}
menuentry "Rescue XUbuntu 18.04 LiveCD" {
set isoname="/xubuntu-18.04.3-desktop-amd64.iso"
@huksley
huksley / 42_custom_grub_efi
Created September 23, 2019 15:59
Custom EFI entry to properly load encrypted partition
#!/bin/bash
BOOT=$HOSTNAME
DEVICE=/dev/nvme0n1
# Encrypted partition
GRUBROOT=(hd0,gpt4)
if [ "$BOOT" == "ubuntu" ]; then
# dont call it ubuntu at is it already exists
BOOT=ubuntu2
fi
# Deploy pods with Nginx container
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx-deployment
spec:
selector:
matchLabels:
app: nginx
replicas: 2 # tells deployment to run 2 pods matching the template
{
"StartAt": "Order Hotel",
"States": {
"Order Hotel": {
"Type": "Task",
"Comment": "Call microservice to order hotel",
"Resource": "arn:aws:lambda:eu-west-1:849707207651:function:travellr-dev-hotel-order",
"Parameters": {
"tripDates.$": "$.tripDates",
"hotelStars.$": "$.hotelStars"