This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
from smartcard.System import readers | |
from smartcard.CardRequest import CardRequest | |
from smartcard.Exceptions import CardRequestTimeoutException, CardConnectionException | |
import time | |
reader = readers() | |
conn = reader[0].createConnection() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
read -sp"Password (8 hex chars raw or string): " p | |
echo | |
if ! grep -q "^[0-9A-Fa-f]\{8\}$" <<< "$p" | |
then | |
echo "You provided a text password." | |
echo "Hashing with: echo -n \"PASSWORD\" | sha256sum" | |
echo "The password will be the first 8 chars of the hash." | |
p=$(echo -n "$p" | sha256sum) | |
p=${p:0:8} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
window.setInterval( | |
async() => { | |
let f = document.querySelector('.ytd-playlist-video-renderer .ytd-thumbnail-overlay-resume-playback-renderer'); | |
if (f) { | |
f = f.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.querySelector('#menu yt-icon-button'); | |
} | |
if (!f) { | |
f = document.querySelector('.ytd-playlist-video-renderer img[src="https://i.ytimg.com/img/no_thumbnail.jpg"]'); | |
if (f) { | |
f = f.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.querySelector('#menu yt-icon-button'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
from model import ExLlama, ExLlamaCache, ExLlamaConfig | |
from tokenizer import ExLlamaTokenizer | |
from generator import ExLlamaGenerator | |
import argparse | |
import torch | |
from timeit import default_timer as timer | |
torch.set_grad_enabled(False) | |
torch.cuda._lazy_init() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"data": "%data%" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
interface JMPSettings { | |
appleremote: { | |
emulatepht: boolean; | |
}; | |
audio: { | |
channels: 'auto' | '2.0' | '5.1,2.0' | '7.1,5.1,2.0'; | |
/** | |
* auto or device name | |
*/ | |
device: string; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* { | |
scrollbar-width: thin; | |
} | |
.skinHeader, | |
html { | |
color: #222; | |
color: rgba(0, 0, 0, 0.87); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class jellyscrubPlugin { | |
constructor({ playbackManager, events }) { | |
this.name = 'Jellyscrub Plugin'; | |
this.type = 'input'; | |
this.id = 'jellyscrubPlugin'; | |
(async() => { | |
const api = await window.apiPromise; | |
const enabled = await new Promise(resolve => { | |
api.settings.value('plugins', 'jellyscrub', resolve); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from machine import I2C | |
import time | |
# BME280 default address. | |
BME280_I2CADDR = 0x76 | |
# Operating Modes | |
BME280_OSAMPLE_1 = 1 | |
BME280_OSAMPLE_2 = 2 | |
BME280_OSAMPLE_4 = 3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This file is executed on every boot (including wake-boot from deepsleep) | |
import gc | |
import ubinascii | |
def do_connect(): | |
import network | |
sta_if = network.WLAN(network.STA_IF) | |
ap_if = network.WLAN(network.AP_IF) | |
if not sta_if.isconnected(): | |
print('connecting to network...') |
NewerOlder