Skip to content

Instantly share code, notes, and snippets.

View timcappalli's full-sized avatar

Tim Cappalli timcappalli

View GitHub Profile
@erkr
erkr / zha-ikea-symfonisk-round-sound-controller.yaml
Created May 12, 2022 10:13
Home Assistant Blueprints: ZHA version for controlling media players with an Ikea Symfonisk
blueprint:
# Author Eric Kreuwels, Copyright 2022, publices under the free MIT license conditions
# This blueprint was inspired by:
# https://community.home-assistant.io/t/zha-ikea-symfonisk-sound-controller-for-media-the-spinny-one/266130
# This version requires to recreate your automations that are based on the version above (new options and therefor not compatible)
# Changes compared to the one that inspired me:
# moved from raw ZHA events to ZHA Symfonisk Device events (raw event attributes changed to often to keep it working)
# added configuration inputs for changing the volume delay and number of volume steps
# added option to either pause (default) or mute for single press action
# restricted the player selection to entities only
@martelletto
martelletto / sshfido2.txt
Last active January 26, 2022 11:05
powershell/openssh-portable + FIDO2 build instructions
1. Building
1.1 Open Windows PowerShell.
1.2 Create a workspace folder:
> mkdir workspace
1.3 Set the WORKSPACE environment variable:
> $Env:WORKSPACE = 'C:\Users\pedro\workspace\'
@julianxhokaxhiu
julianxhokaxhiu / create-iso.sh
Last active June 18, 2023 08:11
Simple bash script to create a Bootable ISO from macOS Big Sur Install Image from Mac App Store
#!/usr/bin/env bash
#===========================================================================
# Works only with the official image available in the Mac App Store.
# Make sure you download the official installer before running this script.
#===========================================================================
# Change this at your desire. Sometimes this works out of the box, sometimes not.
# Default size: ~13.5 GB
DISK_SIZE="13000m"
@NeilMadden
NeilMadden / dpop.js
Created November 19, 2019 12:32
Sketch ECDH DPoP implementation using WebCrypto
const crypto = window.crypto.subtle;
const UTF8 = new TextEncoder('utf-8');
function genKeyPair() {
return crypto.generateKey({
name: "ECDH",
namedCurve: "P-256"
}, false, ['deriveKey', 'deriveBits']);
}
@mackwage
mackwage / windows_hardening.cmd
Last active April 28, 2024 20:54
Script to perform some hardening of Windows OS
:: Windows 10 Hardening Script
:: This is based mostly on my own personal research and testing. My objective is to secure/harden Windows 10 as much as possible while not impacting usability at all. (Think being able to run on this computer's of family members so secure them but not increase the chances of them having to call you to troubleshoot something related to it later on). References for virtually all settings can be found at the bottom. Just before the references section, you will always find several security settings commented out as they could lead to compatibility issues in common consumer setups but they're worth considering.
:: Obligatory 'views are my own'. :)
:: Thank you @jaredhaight for the Win Firewall config recommendations!
:: Thank you @ricardojba for the DLL Safe Order Search reg key!
:: Thank you @jessicaknotts for the help on testing Exploit Guard configs and checking privacy settings!
:: Best script I've found for Debloating Windows 10: https://github.com/Sycnex/Windows10Debloater
:
If you are using Google Chrome and Client SSL Cert and you are tired of constantly selecting certificates, try this:
1. Download and extract Chrome policy templates from here: http://dl.google.com/dl/edgedl/chrome/policy/policy_templates.zip
2. Start the Local Group Policy Editor: Start > Run > gpedit.msc > OK
3. Right-click on Computer Policy > Computer Configuration > Administrative Templates and choose Add/Remove Templates…
4. Click Add…, choose policy_templates\windows\adm\en-US\chrome.adm (from the already downloaded and extracted policy templates) and click Open (Note: if your Windows language is different from en-US choose the chrome.adm from the respective language folder)
5. Navigate to Local Computer Policy > Computer Configuration > Administrative Templates > Classic Administrative Templates (ADM) > Google > Google Chrome > Content Settings
6. Double-click on Automatically select client certificates for these sites
7. Click Enabled
8. Click Show… in the Options pane
@pookjw
pookjw / seedutil.md
Last active July 6, 2023 02:47
Enroll macOS Beta Seed without profile installation

seedutil

Enroll macOS Beta Seed without profile installation

Usage

$ sudo /System/Library/PrivateFrameworks/Seeding.framework/Versions/A/Resources/seedutil 
usage: seedutil enroll SEED_PROGRAM
    seedutil unenroll

seedutil current

@agentsim
agentsim / highsierra_bootable.sh
Created June 10, 2017 02:23
Create bootable ISO from HighSierra Installer
# Generate a BaseSystem.dmg with 10.13 Install Packages
hdiutil attach /Applications/Install\ macOS\ 10.13\ Beta.app/Contents/SharedSupport/InstallESD.dmg -noverify -mountpoint /Volumes/highsierra
hdiutil create -o /tmp/HighSierraBase.cdr -size 7316m -layout SPUD -fs HFS+J
hdiutil attach /tmp/HighSierraBase.cdr.dmg -noverify -mountpoint /Volumes/install_build
asr restore -source /Applications/Install\ macOS\ 10.13\ Beta.app/Contents/SharedSupport/BaseSystem.dmg -target /Volumes/install_build -noprompt -noverify -erase
cp -R /Volumes/highsierra/Packages /Volumes/OS\ X\ Base\ System/System/Installation
hdiutil detach /Volumes/OS\ X\ Base\ System/
hdiutil detach /Volumes/highsierra/
mv /tmp/HighSierraBase.cdr.dmg /tmp/BaseSystem.dmg
@Kovrinic
Kovrinic / .gitconfig
Last active April 11, 2024 11:50
git global url insteadOf setup
# one or the other, NOT both
[url "https://github"]
insteadOf = git://github
# or
[url "git@github.com:"]
insteadOf = git://github
@kylelewiscodes
kylelewiscodes / Backstretch-set.js
Last active August 17, 2017 20:27
Backstretch JS Random Image Array For Backgrounds
jQuery(document).ready(function($) {
// Image Array Variable
var images = [
'/wp-content/themes/agency-pro/images/bg.jpg',
'/wp-content/themes/agency-pro/images/bg1.jpg',
'/wp-content/themes/agency-pro/images/bg2.jpg',
'/wp-content/themes/agency-pro/images/bg3.jpg',
'/wp-content/themes/agency-pro/images/bg4.jpg',
'/wp-content/themes/agency-pro/images/bg5.jpg',