Skip to content

Instantly share code, notes, and snippets.

View jacobsalmela's full-sized avatar
:octocat:
To all that makes us unique

Jacob Salmela jacobsalmela

:octocat:
To all that makes us unique
View GitHub Profile
@tegansnyder
tegansnyder / disable mcafee endpoint protection.md
Last active December 26, 2023 03:18
Disable McAffee Endpoint Protection OSX

method 1

sudo /usr/local/McAfee/AntiMalware/VSControl stopoas

alternatively

sudo defaults write /Library/Preferences/com.mcafee.ssm.antimalware.plist OAS_Enable -bool False
sudo /usr/local/McAfee/AntiMalware/VSControl stop
sudo /usr/local/McAfee/AntiMalware/VSControl reload
@RickyCook
RickyCook / Command.md
Last active November 7, 2023 06:55
Using socat to forward new ports via STDIO in a running Docker container

What?... Why?

Imagine you're messing around in a container, and you install some stuff, add some config, and now it's time to load up your client and check it out! Oh wait, you forgot to forward ports when you created the container! Fear not, all is not lost, for in the world of pipes, and streams, there is always a way to do something disgusting.

The Dockerfile

Example Dockerfile included will install Nginx, and socat in a container, and make Nginx run in foreground mode. To build, and run:

@pudquick
pudquick / recentServersSFL.py
Last active December 29, 2023 17:43
Working with SharedFileList (.sfl) files from OSX 10.11 El Capitan in python
from Foundation import NSKeyedUnarchiver
from struct import unpack
# This entire function is black magic of the highest order and I'll blog about it later
def extract_share(bookmark_data):
content_offset, = unpack('I', bookmark_data[12:16])
first_TOC, = unpack('I', bookmark_data[content_offset:content_offset+4])
first_TOC += content_offset
TOC_len, rec_type, level, next_TOC, record_count = unpack('IIIII', bookmark_data[first_TOC:first_TOC+20])
TOC_cursor = first_TOC + 20
@superjamie
superjamie / raspberry-pi-vpn-router.md
Last active April 13, 2024 12:22
Raspberry Pi VPN Router

Raspberry Pi VPN Router

This is a quick-and-dirty guide to setting up a Raspberry Pi as a "router on a stick" to PrivateInternetAccess VPN.

Requirements

Install Raspbian Jessie (2016-05-27-raspbian-jessie.img) to your Pi's sdcard.

Use the Raspberry Pi Configuration tool or sudo raspi-config to:

@nd-net
nd-net / oct-and-tag.py
Created November 23, 2015 18:49
Does an OCR pass over a passed in PDF file and then tries to tag it using fuzzy search
#!/usr/local/bin/python3
tags = {
"Rechnung": "Rechnung",
"Beleg": "Rechnung"
}
ocrLanguage = "deu"
verbose = False
import sys, subprocess
@celly
celly / gist:1591cf9305734812baad
Last active February 26, 2024 10:30
Personal Deny list for Pi-Hole
#
# link: https://gist.githubusercontent.com/celly/1591cf9305734812baad/raw/
#
# Add to you /usr/local/bin/gravity.sh file under sources=
#
# samsung 'smart tv'
127.0.0.1 log-1.samsungacr.com
127.0.0.1 log-2.samsungacr.com
127.0.0.1 notice.samsungcloudsolution.com
@sivel
sivel / inventory2json.py
Last active December 19, 2023 01:54
Ansible inventory to dynamic inventory JSON output, accepts all inventory input formats
import sys
import json
from ansible.parsing.dataloader import DataLoader
try:
from ansible.inventory.manager import InventoryManager
A24 = True
except ImportError:
from ansible.vars import VariableManager
@LSinev
LSinev / pdfa_pdfx_test.tex
Last active September 5, 2022 00:16
PDF/A-1b and PDF/X-1a testing template. With different options set at start. Seems like PDF/A-1b is still not working with xelatex (because of font info). Inserting RGB images inside CMYK files (and in reverse order too) also breaks compliance :(
% Úτƒ-8 encoded
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Variables initiating %%%
\newcounter{colourmode}
\newcounter{pdftype}
\newcounter{iccinsert}
%% Control of colour mode and pdf type
\setcounter{colourmode}{1} % 0 --- undefined; 1 --- cmyk (always for pdf/x); 2 --- rgb
\setcounter{pdftype}{2} % 0 --- undefined; 1 --- pdf/x; 2 --- pdf/a
@foosel
foosel / README.md
Last active June 25, 2020 11:57
Patron Export Helper
@hivefans
hivefans / shell_output.go
Last active May 12, 2024 10:36
get the realtime output for a shell command in golang|-|{"files":{"shell_output.go":{"env":"plain"}},"tag":"bigdata"}
package main
import (
"bufio"
"fmt"
"io"
"os"
"os/exec"
"strings"
)