Skip to content

Instantly share code, notes, and snippets.

View Bjorn-Eric-Abr's full-sized avatar

Björn-Eric Abr. Bjorn-Eric-Abr

View GitHub Profile
@Bjorn-Eric-Abr
Bjorn-Eric-Abr / GlobalProtect.md
Created September 11, 2025 04:51 — forked from ivakhnov/GlobalProtect.md
[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*

@Bjorn-Eric-Abr
Bjorn-Eric-Abr / instant99.js
Created December 2, 2024 13:51
Node Instant Repeater 99
const http = require("http");
const url = require("url");
const server = http.createServer((req, res) => {
const parsedUrl = url.parse(req.url);
const date = new Date();
const time = date.toLocaleTimeString("sv-SE", { hour12: false });
// Handle OPTIONS requests
if (req.method === "OPTIONS") {
@Bjorn-Eric-Abr
Bjorn-Eric-Abr / esc.karabiner.json
Created October 22, 2024 07:26
Karabiner Caps Lock to Escape when tapped, Control when held
{
"title": "Caps Lock to Escape/Control",
"description": "Caps Lock to Escape when tapped, Control when held",
"manipulators": [
{
"from": { "key_code": "caps_lock" },
"to": [{ "key_code": "left_control" }],
"to_if_alone": [{ "key_code": "escape" }],
"type": "basic"
}
@Bjorn-Eric-Abr
Bjorn-Eric-Abr / .eslintrc.cjs
Created October 30, 2023 20:38
Eslint Typescript
/* eslint-env node */
//
// pnpm add --save-dev @typescript-eslint/parser @typescript-eslint/eslint-plugin eslint typescript eslint-plugin-unicorn
module.exports = {
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:unicorn/recommended',
],
parser: '@typescript-eslint/parser',
@Bjorn-Eric-Abr
Bjorn-Eric-Abr / star-wars.sql
Last active October 26, 2023 14:10
Postgressql Stars Wars seed
-- Create the 'movies' table
CREATE TABLE movies (
movie_id serial PRIMARY KEY,
title VARCHAR(100) NOT NULL,
release_year INT,
director VARCHAR(100),
opening_crawl TEXT
);
-- Create the 'planets' table
@Bjorn-Eric-Abr
Bjorn-Eric-Abr / print256colours.sh
Created September 4, 2022 07:58 — forked from HaleTom/print256colours.sh
Print a 256-colour test pattern in the terminal
#!/bin/bash
# Tom Hale, 2016. MIT Licence.
# Print out 256 colours, with each number printed in its corresponding colour
# See http://askubuntu.com/questions/821157/print-a-256-color-test-pattern-in-the-terminal/821163#821163
set -eu # Fail on errors or undeclared variables
printable_colours=256
const fetch = require('node-fetch')
const pThrottle = require('p-throttle')
const throttle = pThrottle({
limit: 5,
interval: 2000
})
const throttled = throttle(step => {
return fetch(`https://jsonplaceholder.typicode.com/posts/${step}`)
})
@Bjorn-Eric-Abr
Bjorn-Eric-Abr / puppeteer-screenshots.js
Last active May 31, 2018 07:42
Puppeteer – Screenshot array of URLs and handling timeout (unhandledRejection)
/**
* @name Puppeteer – Screenshot array of URLs and handling timeout (unhandledRejection)
*
* @desc Takes a screenshot of every URL in array and handles timeout
* (Times out on purpose)
*
*/
const puppeteer = require( 'puppeteer' );
let urlsToShoot = [ 'https://www.google.se', 'https://github.com/' ]