Skip to content

Instantly share code, notes, and snippets.

@andrewpetrochenkov
andrewpetrochenkov / launchd.sh
Last active October 7, 2025 22:35
macOS security
#!/usr/bin/env bash
# disable SIP first
set "$@" com.apple.AirPlayUIAgent AirPlayXPCHelper # AirPlay
set "$@" com.apple.AirPortBaseStationAgent # AirPort Wifi
set "$@" com.apple.AppleFileServer # File Sharing
set "$@" com.apple.afpfs_checkafp com.apple.afpfs_afpLoad # AppleShare
set "$@" com.apple.appleseed.seedusaged com.apple.appleseed.fbahelperd # Apple feedback
set "$@" com.apple.AOSHeartbeat # AOS - Find My Mac
@matheusagcosta
matheusagcosta / podbot.md
Last active October 31, 2025 23:48
Podbot Counter Strike 1.6 on Mac OSX

1 - Make sure you have Counter Strike installed

2 - Download YAPB http://forums.bots-united.com/showthread.php?t=9986

3 - Extract the zip and move the folder addons with all the content to ~/Library/Application Support/Steam/steamapps/common/Half-Life/cstrike

4 - After that, open the file liblist.gam in the folder above and replace gamedll_osx "dlls/cs.dylib" with this content:

//gamedll_osx "dlls/cs.dylib"
@stephenturner
stephenturner / install-gcc48-linuxbrew-centos6.md
Last active October 23, 2025 06:09
Installing gcc 4.8 and Linuxbrew on CentOS 6

Installing gcc 4.8 and Linuxbrew on CentOS 6

The GCC distributed with CentOS 6 is 4.4.7, which is pretty outdated. I'd like to use gcc 4.8+. Also, when trying to install Linuxbrew you run into a dependency loop where Homebrew's gcc depends on zlib, which depends on gcc. Here's how I solved the problem.

Note: Requires sudo privileges.

Resources:

@alexhawkins
alexhawkins / HashTable.js
Last active August 7, 2021 23:33
Correct Implementation of a Hash Table in JavaScript
var HashTable = function() {
this._storage = [];
this._count = 0;
this._limit = 8;
}
HashTable.prototype.insert = function(key, value) {
//create an index for our storage location by passing it through our hashing function
var index = this.hashFunc(key, this._limit);