Skip to content

Instantly share code, notes, and snippets.

@b0gdanw
b0gdanw / Disable-Ventura-Bloatware.sh
Last active March 27, 2024 12:05
Disable Ventura Bloatware
#!/bin/zsh
# Credit: Original idea and script disable.sh by pwnsdx https://gist.github.com/pwnsdx/d87b034c4c0210b988040ad2f85a68d3
# Disabling unwanted services on macOS Big Sur (11), macOS Monterey (12) and macOS Ventura (13)
# Disabling SIP is required ("csrutil disable" from Terminal in Recovery)
# Modifications are written in /private/var/db/com.apple.xpc.launchd/ disabled.plist, disabled.501.plist
# To revert, delete /private/var/db/com.apple.xpc.launchd/ disabled.plist and disabled.501.plist and reboot; sudo rm -r /private/var/db/com.apple.xpc.launchd/*
# user
@mmazzarolo
mmazzarolo / elevations.ts
Last active June 1, 2022 15:12
React-Native cross platform elevation definitions
/**
* React-Native cross-platform elevations.
* Based on https://ethercreative.github.io/react-native-shadow-generator/
*
* Usage:
* 1. Import "elevations" from this file
* import { elevations } from "config/elevations";
* 2. Use it. Assuming you need an elevation of 2 (based on the Android
* elevation standard), doing the following will cast the same shadow
* on both platforms:
@da-n
da-n / usb-unlock-luks.md
Created August 24, 2019 13:11
Unlock LUKS full disk with USB stick

Configuration for passwordless root filesystem

Source: https://www.howtoforge.com/tutorial/passwordless-encryption-of-linux-root-partition/

The process of entering the passphrase at boot time will now be automated using an USB memory stick. Instead of using a passphrase , the secret key on the USB will decrypt the encrypted volumes. Connect an USB stick to the VM and locate it using the dmesg command. It is detected as /dev/sdb in my VM.

The secret key of 8192 random byte is extracted from the usb stick using the dd command.

dd if=/dev/sdb of=/root/secret.key bs=512 skip=4 count=16
@Axect
Axect / typora.desktop
Created October 27, 2017 07:17
desktop file for typora
[Desktop Entry]
Name=Typora
Comment=Open Typora
Exec=typora
Icon=typora
Terminal=false
Type=Application
Categories=Development;
@webframp
webframp / keybase.md
Created July 25, 2017 18:14
Signing git commits on github using keybase.io gpg key

Probably one of the easiest things you'll ever do with gpg

Install Keybase: https://keybase.io/download and Ensure the keybase cli is in your PATH

First get the public key

keybase pgp export | gpg --import

Next get the private key

@0chroma
0chroma / VFIO Setup Guide.md
Last active March 12, 2024 13:49
Windows 10 VFIO QEMU Setup

VFIO Setup Guide

I play games regularly, and the sad reality is that it forces me to use Windows on my desktop. There's a Linux installation on there, but rebooting into it is such a massive interruption that I usually just move over to my laptop for programming. Working on a laptop leads to all sorts of ergonomic issues, and it felt like a massive waste to not develop on the desktop hardware I invested so much in. So after extensively researching what the VFIO community has been doing, I've deleted my Windows installation and moved all my gaming into a virtual machine on a Linux host.

Normally VMs are too slow for gaming, but thanks to a feature called VFIO you can run games at near-native performance by passing graphics cards and USB controllers directly to a virtual machine. The only requirement is that your board supports IOMMU, which most modern systems have. In this guide I'll wal

@josy1024
josy1024 / SH-Set-KnownFolderPath.ps1
Last active October 23, 2023 02:11
powershell set shell folders! Use the SHGetFolderPath or SHGetKnownFolderPath function instead Shell Folders
<#
.SYNOPSIS
Sets a known folder's path using SHSetKnownFolderPath.
.PARAMETER Folder
The known folder whose path to set.
.PARAMETER Path
The path.
#>
# USAGE: # Set-KnownFolderPath -KnownFolder 'Desktop' -Path '\\netserver\desktop\username\desktop'
# FROM: http://stackoverflow.com/questions/25709398/set-location-of-special-folders-with-powershell
@matzipan
matzipan / gala-wayland.md
Last active March 10, 2020 12:27
Getting Gala to run with Wayland

If you're interested in helping with this, join us on IRC: #elementary-dev on irc.freenode.net

Prerequisite: install the xwayland package.

I managed to get Gala to run in a VT with:

dbus-run-session -- gala --display-server --wayland

It even works with just gala --display-server --wayland, but the session still doesn't start.

@timsneath
timsneath / profile.ps1
Last active April 29, 2024 20:01
PowerShell template profile: adds some useful aliases and functions
### PowerShell template profile
### Version 1.03 - Tim Sneath <tim@sneath.org>
### From https://gist.github.com/timsneath/19867b12eee7fd5af2ba
###
### This file should be stored in $PROFILE.CurrentUserAllHosts
### If $PROFILE.CurrentUserAllHosts doesn't exist, you can make one with the following:
### PS> New-Item $PROFILE.CurrentUserAllHosts -ItemType File -Force
### This will create the file and the containing subdirectory if it doesn't already
###
### As a reminder, to enable unsigned script execution of local scripts on client Windows,
@skipjac
skipjac / rssreader.html
Created April 29, 2013 17:53
Zendesk Classic RSS reader widget
<h4>Blog</h4>
<div id="feedContent">
</div>
<script>
$j(document).ready(function() {
truncate = function(text, length, ellipsis) {