Skip to content

Instantly share code, notes, and snippets.

View neuronsoverflow's full-sized avatar
💭
Chilling

neurons://overflow neuronsoverflow

💭
Chilling
View GitHub Profile
@neuronsoverflow
neuronsoverflow / apple_caching_commands.sh
Created February 18, 2021 21:52 — forked from ntrogers/apple_caching_commands.sh
[Apple Cacheing commands]
https://support.apple.com/guide/mac-help/configure-advanced-content-caching-settings-mchl91e7141a/mac
# On client, test caching server availability
/usr/bin/assetcachelocatorutil
# View log
log show --predicate 'subsystem == "com.apple.AssetCache"'
log stream --predicate 'subsystem == "com.apple.AssetCache"'
# Display content cache settings
#! /bin/bash
if grep -q nginx
then
cd /opt
rm -rf ssdeep
git clone https://github.com/ssdeep-project/ssdeep
cd ssdeep/
./bootstrap
./configure
@neuronsoverflow
neuronsoverflow / gist:1f761625dc5b94146a8291a183395b61
Created August 18, 2020 16:10 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@neuronsoverflow
neuronsoverflow / osx_defaults.sh
Created July 5, 2020 20:31
OSX Defaults to setup a brand new machine
#!/usr/bin/env bash
# echo "Need to recapture iTerm settings"
# exit -1
# TODO: Need to figure out the settings for the following:
# 1) Finder: Left nav, favorite items with their order
# 2) Dock: Items with order
# 3) Security & Privacy Preferences: Full Disk Access, Camera, Microphone
# 4) Login items for my user (i.e. apps started when I login)
@neuronsoverflow
neuronsoverflow / ForwardRasPiHwRng.md
Created March 26, 2020 21:03 — forked from jesrui/ForwardRasPiHwRng.md
How to forward the Raspberry Pi hardware random number generator over ssh

How to forward the Raspberry Pi hardware random number generator over ssh

This is a modification of RandPi. The diffrence is that here the data transport is done via ssh forwarding instead of a custom http service.

See the C't article Mit dem Raspberry Pi Zufallszahlen erzeugen und verteilen for more information (in german).

@neuronsoverflow
neuronsoverflow / nosleep.sh
Created January 2, 2020 18:57
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
# Before doing anything, save your current configuration using
pmset -g
# To disable sleep
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 [original hibernatemode value]; sudo pmset -a disablesleep 0;
@neuronsoverflow
neuronsoverflow / git.sh
Created January 2, 2020 18:55
Sign commits automatically on macOS Sierra and Github Desktop
# Install GPG Tools 2 and generate your PGP keys
# Add the public key in your Github account
# Get your long id by doing: gpg --list-keys --keyid-format long
# Execute this:
# Ty https://github.com/Microsoft/vscode/issues/5065#issuecomment-207960831
git config --global user.signingkey [LONG KEY ID] && git config --global commit.gpgsign true && git config --global gpg.program gpg2; echo 'no-tty' >> ~/.gnupg/gpg.conf
@neuronsoverflow
neuronsoverflow / disable.sh
Created January 2, 2020 18:52 — forked from SiestaDigital/disable.sh
Disable bunch of #$!@ in Catalina
#!/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
# WARNING: It might disable things that you may not like. Please double check the services in the TODISABLE vars.
# Get active services: launchctl list | grep -v "\-\t0"
# Find a service: grep -lR [service] /System/Library/Launch* /Library/Launch* ~/Library/LaunchAgents
@neuronsoverflow
neuronsoverflow / gist:8ade1bbe72f51711d17b69560e8f4bff
Created January 2, 2020 18:50 — forked from jblyberg/gist:35e68be7fa9ebf1e66ed
Clean Install – OS X 10.11 El Capitan

OS X Preferences


most of these require logout/restart to take effect

# Enable character repeat on keydown
defaults write -g ApplePressAndHoldEnabled -bool false

# Keyboard repeat
#!/usr/bin/env bash
# ~/.macos — https://mths.be/macos
# Close any open System Preferences panes, to prevent them from overriding
# settings we’re about to change
osascript -e 'tell application "System Preferences" to quit'
# Ask for the administrator password upfront
sudo -v