Skip to content

Instantly share code, notes, and snippets.

@ivakhnov
ivakhnov / GlobalProtect.md
Created February 28, 2020 21:31
[How to quit GlobalProtect (mac)] If you've used the globalprotect client for Mac, you may notice that there is no way to exit it, meaning it can continue submitting information about your system to your company in the background, including your current patches, interface information and much much more, even at times you're not connected to the …

We can just unload the launchd script keeping it alive.

Stop spying on me:

launchctl unload /Library/LaunchAgents/com.paloaltonetworks.gp.pangp*

I want to use the VPN again:

launchctl load /Library/LaunchAgents/com.paloaltonetworks.gp.pangp*

@mikebuss
mikebuss / decode-json-swift.swift
Created January 25, 2019 21:46
Decode [Any] and [String: Any] Swift 4
//
//
// Adapted from:
//
// Original: https://gist.github.com/loudmouth/332e8d89d8de2c1eaf81875cfcd22e24
// Adds encoding: https://github.com/3D4Medical/glTFSceneKit/blob/master/Sources/glTFSceneKit/GLTF/JSONCodingKeys.swift
// Adds fix for null inside arrays causing infinite loop: https://gist.github.com/loudmouth/332e8d89d8de2c1eaf81875cfcd22e24#gistcomment-2807855
//
struct JSONCodingKeys: CodingKey {
var stringValue: String
using NtApiDotNet;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active May 7, 2024 06:03
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@darconeous
darconeous / tesla-key-card-protocol.md
Last active May 7, 2024 06:02
Tesla Key Card Protocol

Tesla Key Card Protocol

Researched by Robert Quattlebaum darco@deepdarc.com.

Last updated 2020-02-03.

Image of Tesla Key Card Image of Tesla Model 3 Key Fob

@Integralist
Integralist / aspect_ratio.py
Last active May 7, 2024 05:59
[Calculate Aspect Ratio] #aspect #ratio #python
def calculate_aspect(width: int, height: int) -> str:
def gcd(a, b):
"""The GCD (greatest common divisor) is the highest number that evenly divides both width and height."""
return a if b == 0 else gcd(b, a % b)
r = gcd(width, height)
x = int(width / r)
y = int(height / r)
return f"{x}:{y}"
nodes:
- id: webcam
custom:
source: https://huggingface.co/datasets/dora-rs/dora-idefics2/raw/main/operators/opencv_stream.py
outputs:
- image
- id: idefics2
operator:
python: https://huggingface.co/datasets/dora-rs/dora-idefics2/raw/main/operators/idefics2_op.py
inputs:
[
{
"kana": "",
"roumaji": "a",
"type": "gojuuon"
},
{
"kana": "",
"roumaji": "i",
"type": "gojuuon"
[
{
"kana": "",
"roumaji": "a",
"type": "gojuuon"
},
{
"kana": "",
"roumaji": "i",
"type": "gojuuon"