Skip to content

Instantly share code, notes, and snippets.

using System;
using System.IO;
using System.Net;
using System.Net.Http;
using System.Threading.Tasks;
namespace TestConsole
{
// From https://stackoverflow.com/a/41392145/4213397
@roib20
roib20 / apt-repo-playbook.yaml
Last active January 1, 2025 17:42
Example usages of the new `deb822_repository` Ansible module
---
- hosts: localhost
connection: local
gather_facts: true
tasks:
- name: Add APT repositories
when: ansible_os_family == 'Debian'
become: true
block:
@parmentf
parmentf / GitCommitEmoji.md
Last active January 1, 2025 17:42
Git Commit message Emoji
@allenporter
allenporter / notify_agent_agenda.yaml
Last active January 1, 2025 17:42
Home Assistant Blueprint: Conversation agent Agenda Notification
---
blueprint:
name: Conversation agent Agenda Notification
description:
Conversation agent generates a notification based on the upcoming calendar
agenda, location, and weather information.
domain: automation
input:
notify_time:
name: Notification time
@maidopi-usagi
maidopi-usagi / outline_atlas.gdshader
Created January 1, 2025 17:37
Godot AtlasTexture Outline Shader
shader_type canvas_item;
const vec2 VERTICES[4] = vec2[](vec2(0.0),vec2(0.0,1.0),vec2(1.0),vec2(1.0,0.0));
varying vec2 originalUV;
varying flat vec4 regionInfo;
uniform int outline_size:hint_range(0,10) = 1;
uniform vec4 outline_color:source_color = vec4(1.0);
void vertex() {
@christo070
christo070 / sign-modules-for-secure-boot-in-debian.md
Last active January 1, 2025 17:36
How to sign NVIDIA or Virtual Box Modules for Secure Boot in Debian 12 or Ubuntu

The commands in this article are run on Debian 12 Bookworm. If your system is Ubuntu or any other Debian based distribution, the default locations may be different, but the instructions remain same.

Assuming you have downloaded NVIDIA Drivers from apt repository, (in case you have downloaded NVIDIA Driver from Website, please refer the 1st web page in References).

Ensure that Secure Boot is Off or Secure Boot is enabled in Audit Mode (Depends on your PC manufacturer UEFI). You could change Secure Boot mode in UEFI settings.

Secure Boot Mode Here its in Deployed mode, change it to Audit mode.

Secure Boot state can be checked by

@estruyf
estruyf / vscode-theme-variables.css
Created January 28, 2022 13:21
All VS Code theme variables
:root {
--vscode-font-weight:normal;
--vscode-font-size:13px;
--vscode-editor-font-family:"Operator Mono Lig", "Cascadia Code";
--vscode-editor-font-weight:normal;
--vscode-editor-font-size:15px;
--vscode-foreground:#f3eff5;
--vscode-errorForeground:#f48771;
--vscode-descriptionForeground:rgba(243, 239, 245, 0.7);
--vscode-icon-foreground:#c5c5c5;
@tobek
tobek / get-image-urls.js
Last active January 1, 2025 17:25
Save images from chrome inspector/dev tools network tab
/* open up chrome dev tools (Menu > More tools > Developer tools)
* go to network tab, refresh the page, wait for images to load (on some sites you may have to scroll down to the images for them to start loading)
* right click/ctrl click on any entry in the network log, select Copy > Copy All as HAR
* open up JS console and enter: var har = [paste]
* (pasting could take a while if there's a lot of requests)
* paste the following JS code into the console
* copy the output, paste into a text file
* open up a terminal in same directory as text file, then: wget -i [that file]
*/
@midwire
midwire / find_duplicate_movies.rb
Last active January 1, 2025 17:24
[Ruby script to find duplicate movies] Edit as necessary for your own needs. #ruby #utils
#!/usr/bin/env ruby
# Find duplicate movies with possible different extensions
require 'fileutils'
require 'colored'
include FileUtils
module FindDuplicateMovies
@koleson
koleson / Future_Experiments.md
Last active January 1, 2025 17:24
PVS6 Notes

Past and Future Experiments

Ideas for profitable investigations and an index of experimental results. Free to a good home; will post results as they come in.

Past Experiments

MQTT reroute - MQTT_Reroute.md

Very fruitful - finally understood how the mySunPower app's SunVault mode changes are communicated to the PVS6, which performs the system control described by the modes, and found a potential method of changing the command and data acquisition server from one in the cloud to one that is locally controlled.

Future Experiments