Skip to content

Instantly share code, notes, and snippets.

View bebrws's full-sized avatar

Brad Barrows bebrws

View GitHub Profile
@bebrws
bebrws / bpf.c
Created February 26, 2022 00:59 — forked from 2opremio/bpf.c
Example of using bpf to capture packets in OSX
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <fcntl.h>
#include <err.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/socket.h>
@bebrws
bebrws / UbuntuVNC.md
Last active April 21, 2021 18:14
VNC Server on Ubuntu 20.10 Using TightVNC
@bebrws
bebrws / RSSFeedsDev
Last active November 16, 2019 04:30
RSS Feeds
https://indiestack.com/feed/
Empty File
sdf
asdfsdf
sd
This is the content of my new gist
@bebrws
bebrws / BetterFilename
Last active November 19, 2019 05:37
Fdfd
Some content
@bebrws
bebrws / LATEST
Last active December 24, 2019 17:08
Fd
latest
test
@bebrws
bebrws / MAKDOWNTEST
Last active November 28, 2019 22:44
sdfd
This file has been truncated, but you can view the full file.
### Thisi s a big heaeder
A LIST
* sdf
* sfasdf
* j2
* asd
* asdf
* kl
@bebrws
bebrws / enableSSS.sh
Last active May 20, 2023 22:38
enableScreensharingServices
#!/bin/bash
# IMPORTANT: Don't forget to logout from your Apple ID in the settings before running it!
# IMPORTANT: You will need to run this script from Recovery. In fact, macOS Catalina brings read-only filesystem which prevent this script from working from the main OS.
# This script needs to be run from the volume you wish to use.
# E.g. run it like this: cd /Volumes/Macintosh\ HD && sh /Volumes/Macintosh\ HD/Users/sabri/Desktop/disable.sh
# Get active services: launchctl list | grep -v "\-\t0"
# Find a service: grep -lR [service] /System/Library/Launch* /Library/Launch* ~/Library/LaunchAgents
@bebrws
bebrws / nosleep.sh
Last active October 29, 2019 10:01
Completely disable sleep on any Mac
# Useful to prevent Macbooks to go to sleep when closing the lid instead of running tools that requires a Kernel Extension (e.g. InsomniaX) and more
sudo pmset -a sleep 0; sudo pmset -a hibernatemode 0; sudo pmset -a disablesleep 1;
# And to go back to normal:
sudo pmset -a sleep 1; sudo pmset -a hibernatemode 25; sudo pmset -a disablesleep 0;