Skip to content

Instantly share code, notes, and snippets.

@Trenly
Trenly / README.md
Last active October 1, 2024 11:05
Install Winget to the Windows Sandbox Base Image

This powershell script modifies the Base Image, or the Virtual Hard Disk, which the Windows Sandbox launches upon startup. It will copy the required files to the sandbox and add a registry key which will install them upon startup. By default the script will install the latest stable release of Winget. You can specify to use the latest pre-release with the -PreRelease switch.

When a new version of Winget is released, run this script again to update the installation in the sandbox to the latest version

@wildestpixel
wildestpixel / code.py
Last active July 17, 2022 23:43
Raspberry Pi Pico & Pimoroni RGB Keypad HID in Circuitpython 6.2+
# Adapted from Sandy J Macdonald's gist at https://gist.github.com/sandyjmacdonald/b465377dc11a8c83a8c40d1c9b990a90 to configure all buttons and switch off all lights in loop
import time
import board
import busio
import usb_hid
from adafruit_bus_device.i2c_device import I2CDevice
import adafruit_dotstar
@Tamal
Tamal / set-chroot.sh
Last active November 3, 2024 21:53
Setting up chroot from a live image in Fedora. Regenerate grub2 for Fedora.
$ # Use Live CD to boot
$ sudo su # Switch to root
$ fdisk -l # Get names of root, boot & EFI partition names. you can also use blkid
$ mount /dev/mapper/fedora_localhost--live-root /mnt # mount root partition
$ cat /mnt/etc/fedora-release
Fedora release 31 (Thirty One)
$ mount /dev/nvme0n1p2 /mnt/boot # mount boot partition
$ mount /dev/nvme0n1p1 /mnt/boot/efi # mount EFI partition
# Note: If you are not able to mount EFI partition ('Input/Output error'),
# You may have to repair ESP file system or format ESP.
@atiris
atiris / osmc-java-jdownloader-installer.sh
Last active September 8, 2023 13:01
Wizard to install the current version of JDownloader (jdownloader.org) on raspberry pi (running osmc or another linux). You can install (together or individually) latest java for RPI, download and install headless JDownloader (my.jdownloader.org) and create service to start JDownloader after boot and restart automatically after crash.
#!/bin/bash
# Script: osmc-java-jdownloader-installer.sh
# Author: Jozef Pažin
# Description: Wizard to install the current version of java and/or jdownloader on raspberry pi running osmc.
# License: MIT | use arbitrarily, attribution is not required
# How to run:
# - Check if this code is correct first because this script need to be run under root and run gist
# from web is not recommended in terms of security only that you know exactly what it does. Check it:
# curl -Ls https://gist.github.com/atiris/34dc670264274b3a472f2a718e4de83a/raw | nano -
@ewpratten
ewpratten / hosts-yt-ads
Last active October 25, 2024 16:37
youtube ads hosts file
This project has been moved to a GitHub repository to allow Pull Requests.
See: https://github.com/Ewpratten/youtube_ad_blocklist
@Cyberek
Cyberek / README.txt
Last active September 9, 2021 00:17
Starting Kodi automatically on Raspbian Jessie and Stretch
So you were able to install Kodi via "sudo apt-get install kodi" but have no idea how to force it to autostart on boot?
You have tried all those googled solutions such as adding kodi-standalone to .bashrc, creating init.d script but nothing worked?
This is the right place to get the answer.
For some reason, the current version of Kodi doesnt provide 2 important files:
/etc/init.d/kodi
/etc/default/kodi
@varqox
varqox / install_debian_with_debootstrap_howto.md
Last active October 27, 2024 21:16
Instructions how to install Debian using debootstrap
@nl5887
nl5887 / transfer.fish
Last active July 30, 2024 09:21
Bash and zsh alias for transfer.sh. Transfers files and directories to transfer.sh.
function transfer
if test (count $argv) -eq 0
echo "No arguments specified. Usage:\necho transfer /tmp/test.md\ncat /tmp/test.md | transfer test.md"
return 1
end
## get temporarily filename, output is written to this file show progress can be showed
set tmpfile ( mktemp -t transferXXX )
## upload stdin or file
@rubo77
rubo77 / mount-root
Last active May 25, 2023 08:22
Mounts all needed mount points to change into another system from within a live-CD
#!/bin/bash
# mounts all needed mount points to change into another system from within a live-CD
#-------------- Author: -------------#
# by Ruben Barkow (Rubo77)
if [ "$(whoami &2>/dev/null)" != "root" ] && [ "$(id -un &2>/dev/null)" != "root" ] ; then
echo "You must be root to run this script!"; echo "use 'sudo !!'"; exit 1
fi
@vertexclique
vertexclique / cracking.md
Last active September 18, 2024 11:54
Cracking guide for Sublime Text 3 Build 3059 / 3065 ( Mac / Win x86_64 / Windows x86 / Linux x64 / Linux x86 )

MacOS

Build 3059

MD5: 59bab8f71f8c096cd3f72cd73851515d

Rename it to: Sublime Text

Make it executable with: chmod u+x Sublime\ Text