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 / waitForKeyElements.js
Created April 10, 2024 23:54
waitForKeyElements
/*--- waitForKeyElements(): A utility function, for Greasemonkey scripts,
that detects and handles AJAXed content.
Usage example:
waitForKeyElements (
"div.comments"
, commentCallbackFunction
);
@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 / nounou.sh
Created September 27, 2018 14:21
une noucou 2.0
#!/usr/bin/env bash
# nounou 2.0
# say command on mac OS : Making your Mac talk with the sentence you pass, in french there
enfants[0]='Marceau'
enfants[1]='Émile'
actions[0]='range ta chambre'
actions[1]='mets tes chaussons'
@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)

Keybase proof

I hereby claim:

  • I am bunam on github.
  • I am bunam (https://keybase.io/bunam) on keybase.
  • I have a public key ASDUp2rZu0fCtf6zLARuiNAV9uQlLuoZa_U1E0BMjt-sVwo

To claim this, I am signing this object: