Skip to content

Instantly share code, notes, and snippets.

@genakolechenkov
genakolechenkov / webos-aid-patcher.rs
Created May 13, 2024 12:07 — forked from kitsuned/webos-aid-patcher.rs
Bypass App ID assertion in appinstalld on webOS Signage TV
use std::{
fs,
fs::File,
io::{BufRead, BufReader},
os::raw::c_void,
path::{PathBuf},
};
use goblin::elf::Elf;
use nix::{
@Shellnco
Shellnco / ecverify.sol
Created May 13, 2024 12:07 — forked from axic/ecverify.sol
Ethereum ECVerify
//
// The new assembly support in Solidity makes writing helpers easy.
// Many have complained how complex it is to use `ecrecover`, especially in conjunction
// with the `eth_sign` RPC call. Here is a helper, which makes that a matter of a single call.
//
// Sample input parameters:
// (with v=0)
// "0x47173285a8d7341e5e972fc677286384f802f8ef42a5ec5f03bbfa254cb01fad",
// "0xaca7da997ad177f040240cdccf6905b71ab16b74434388c3a72f34fd25d6439346b2bac274ff29b48b3ea6e2d04c1336eaceafda3c53ab483fc3ff12fac3ebf200",
// "0x0e5cb767cce09a7f3ca594df118aa519be5e2b5a"
[
{
"backcolor": "#141414",
"name": "Adelheid",
"author": "floookay",
"switchMount": "cherry",
"switchBrand": "gateron",
"pcb": true
},
[
@diasporx
diasporx / JetBrains products Activation code until 14 October 2024
Last active May 13, 2024 12:06
JetBrains products Activation code until 14 October 2024
I2A0QUY8VU-eyJsaWNlbnNlSWQiOiJJMkEwUVVZOFZVIiwibGljZW5zZWVOYW1lIjoiVU5JVkVSU0lEQURFIEVTVEFEVUFMIERFIENBTVBJTkFTIiwiYXNzaWduZWVOYW1lIjoiVGFvYmFv77yaSkVU5YWo5a625qG25r+AIOa0u+W3peS9nOWupCAgcmVuIHpodW4gZGlhbiBtaW5n77yBIiwiYXNzaWduZWVFbWFpbCI6IlJvYmJ5X1dlbmlnZXJAb3V0bG9vay5jb20iLCJsaWNlbnNlUmVzdHJpY3Rpb24iOiJGb3IgZWR1Y2F0aW9uYWwgdXNlIG9ubHkiLCJjaGVja0NvbmN1cnJlbnRVc2UiOmZhbHNlLCJwcm9kdWN0cyI6W3siY29kZSI6IkRQTiIsInBhaWRVcFRvIjoiMjAyNC0xMC0xNCIsImV4dGVuZGVkIjpmYWxzZX0seyJjb2RlIjoiREIiLCJwYWlkVXBUbyI6IjIwMjQtMTAtMTQiLCJleHRlbmRlZCI6ZmFsc2V9LHsiY29kZSI6IlBTIiwicGFpZFVwVG8iOiIyMDI0LTEwLTE0IiwiZXh0ZW5kZWQiOmZhbHNlfSx7ImNvZGUiOiJJSSIsInBhaWRVcFRvIjoiMjAyNC0xMC0xNCIsImV4dGVuZGVkIjpmYWxzZX0seyJjb2RlIjoiUlNDIiwicGFpZFVwVG8iOiIyMDI0LTEwLTE0IiwiZXh0ZW5kZWQiOnRydWV9LHsiY29kZSI6IkdPIiwicGFpZFVwVG8iOiIyMDI0LTEwLTE0IiwiZXh0ZW5kZWQiOmZhbHNlfSx7ImNvZGUiOiJETSIsInBhaWRVcFRvIjoiMjAyNC0xMC0xNCIsImV4dGVuZGVkIjpmYWxzZX0seyJjb2RlIjoiUlNGIiwicGFpZFVwVG8iOiIyMDI0LTEwLTE0IiwiZXh0ZW5kZWQiOnRydWV9LHsiY29kZSI6IkRTIiwicGFpZFVwVG8iOiIyMDI0LTEwL
@bedawi
bedawi / disabledgpu.sh
Created February 5, 2023 09:37
MacBookPro5,3, Fedora Linux: Disable discrete GPU and optimize power consumption
#!/bin/bash
echo 1 > /sys/bus/pci/devices/0000\:02\:00.0/remove
@choco-bot
choco-bot / FilesSnapshot.xml
Created May 13, 2024 12:06
yuanliao-utools v2.1.0 - Failed - Package Tests Results
<?xml version="1.0" encoding="utf-8"?>
<fileSnapshot xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<files>
<file path="C:\ProgramData\chocolatey\lib\yuanliao-utools\yuanliao-utools.nupkg" checksum="C6973811B182E108971BF36465EA175E" />
<file path="C:\ProgramData\chocolatey\lib\yuanliao-utools\yuanliao-utools.nuspec" checksum="F26F9FA18FD261B334B120A303C3006C" />
<file path="C:\ProgramData\chocolatey\lib\yuanliao-utools\tools\chocolateyinstall.ps1" checksum="AA66E7519C6744EA998266EC438B2AA8" />
<file path="C:\ProgramData\chocolatey\lib\yuanliao-utools\tools\chocolateyuninstall.ps1" checksum="8B1AF0A4886BFE932648A7210BFEC0DF" />
</files>
</fileSnapshot>
@davidjguru
davidjguru / drupal_8_adding_new_fields_in_database.txt
Created August 29, 2019 21:06
Drupal 8: Adding new fields in the database (install / uninstall)
// Context: In a custom module, within the .install file
// Doing tasks on the installation.
// Looking for a field and create if not exist.
// We'll delete this field in the uninstallation process.
// We're using a pair of basic Drupal hooks: install and uninstall.
/**
* Implements hook_install().
*/
function your_custom_module_install() {
@kitsuned
kitsuned / webos-aid-patcher.rs
Created March 17, 2024 02:14
Bypass App ID assertion in appinstalld on webOS Signage TV
use std::{
fs,
fs::File,
io::{BufRead, BufReader},
os::raw::c_void,
path::{PathBuf},
};
use goblin::elf::Elf;
use nix::{
@phalt
phalt / dict_to_xml.py
Created August 28, 2020 01:50
Python dictionary to xml string
from xml.etree.ElementTree import Element, tostring
def dict_to_xml(tag: str, d: dict) -> str:
"""
Converts a Python dictionary to an XML tree, and then returns
it as a string.
Works with recursively nested dictionaries!
"tag" is the name of the top-level XML tag.
"""
elem = Element(tag)