Skip to content

Instantly share code, notes, and snippets.

View bunam's full-sized avatar
🏠
Working from home

bunam

🏠
Working from home
  • French Alps
View GitHub Profile
@bunam
bunam / macos-sudo-nopasswd.sh
Created July 2, 2023 23:34 — forked from juliyvchirkov/macos-sudo-nopasswd.sh
bash: sudo without a password on macOS
#!/bin/bash
#
# Enable nopasswd mode for sudo on macOS from the userspace in fast and totally non-interactive way
#
# Type the password last time to apply the new mode and forget it for any console task for ages
# Use the rollback to restore password protection
#
# Developed and tested by https://juliyvchirkov.github.io/ under the MIT license on macOS Big Sur 11.2.0
#
# Get latest version at https://gist.github.com/juliyvchirkov/3ca76582ed6b6a8366c9e7d60644960d
@bunam
bunam / PS-BGInfo.ps1
Created June 8, 2023 08:17 — forked from dieseltravis/PS-BGInfo.ps1
update wallpaper background image with powershell (like Sysinternals BGInfo)
# PS-BGInfo
# Powershell script that updates the background image with a random image from a folder and writes out system info text to it.
# run as a lower priority task
[System.Threading.Thread]::CurrentThread.Priority = 'BelowNormal'
# Configuration:
# Font Family name
$font="Input"
@bunam
bunam / QEMU-Silicon-Mac-Virtualization.md
Created September 5, 2021 15:09 — forked from nrjdalal/QEMU-Silicon-Mac-Virtualization.md
Create Virtual Machines using QEMU on Silicon based Apple Macs

Install QEMU on Silicon based Apple Macs (June 2021)

Option 1 - Automatically

zsh -c "$(curl -fsSL https://raw.githubusercontent.com/nrjdalal/silicon-virtualizer/master/install-qemu.sh)"

Option 2 - Manually

  • Install Xcode command line tools

xcode-select --install
@bunam
bunam / ansible_ssl_cert.yaml
Created April 18, 2019 12:27 — forked from jsidhu/ansible_ssl_cert.yaml
Ansible snippet to create a self signed ssl certificate
# - name: Generate DH Params (may take several minutes!)
# command: openssl dhparam \
# -out "/data/jenkins_home/ssl/dhparam.pem" 2048
# args:
# creates: "/data/jenkins_home/ssl/dhparam.pem"
#
# - name: Generate ECC Key
# command: openssl ecparam \
# -genkey \
# -name prime256v1 \
@bunam
bunam / git-create-revisioninfo-hook.sh
Created April 10, 2019 06:47 — forked from ThomDietrich/git-create-revisioninfo-hook.sh
git hook for revision and branch version file
#!/bin/bash
## Automatically generate a file with git branch and revision info
##
## Example:
## [master]v2.0.0-beta-191(a830382)
## Install:
## cp git-create-revisioninfo-hook.sh .git/hooks/post-commit
## cp git-create-revisioninfo-hook.sh .git/hooks/post-checkout
## cp git-create-revisioninfo-hook.sh .git/hooks/post-merge
@bunam
bunam / Kernel Extension Policy.mobileconfig
Created September 7, 2018 12:38 — forked from MagerValp/Kernel Extension Policy.mobileconfig
Sample kernel extension whitelist for 10.13.4+
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>PayloadContent</key>
<array>
<dict>
<key>AllowUserOverrides</key>
<true/>
<key>AllowedTeamIdentifiers</key>
@bunam
bunam / instantkali.sh
Created March 8, 2018 13:21 — forked from jgamblin/instantkali.sh
Start an EC2 Kali Instance In Under 60 Seconds.
#!/bin/bash
set -e
set -u
clear
ami="ami-10e00b6d"
size="t2.medium"
today=$(date +"%m-%d-%y-%H%M")
localip=$(curl -s https://ipinfo.io/ip)
@bunam
bunam / .bash_profile
Created October 9, 2016 21:45 — forked from natelandau/.bash_profile
Mac OSX Bash Profile
# ---------------------------------------------------------------------------
#
# Description: This file holds all my BASH configurations and aliases
#
# Sections:
# 1. Environment Configuration
# 2. Make Terminal Better (remapping defaults and adding functionality)
# 3. File and Folder Management
# 4. Searching
# 5. Process Management
#!/bin/bash
#
# mailcatcher This shell script takes care of starting and stopping
# the mailcatcher fake/dev mail server.
# -> adduser mailcatcher
# -> chkconfig mailcatcher on
# chkconfig: - 64 36
# description: stop and start mailcatcher fake mail server
# processname: mailcatcher
# config: /etc/mailcatcher.cnf