Skip to content

Instantly share code, notes, and snippets.

@gboudreau
gboudreau / AuthyToOtherAuthenticator.md
Last active May 19, 2024 06:39 — forked from Ingramz/AuthyToOtherAuthenticator.md
Export TOTP tokens from Authy
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Custom Scrollbar Windows 95 Style</title>
<style>
body {
margin: 0;
font-family: Arial, sans-serif;
@tonY1883
tonY1883 / ValidateYoutubeVideoId.js
Created September 14, 2017 02:18
A small trick to check if youtube video exist with its id.
function validVideoId(id) {
var img = new Image();
img.src = "http://img.youtube.com/vi/" + id + "/mqdefault.jpg";
img.onload = function () {
checkThumbnail(this.width);
}
}
function checkThumbnail(width) {
//HACK a mq thumbnail has width of 320.
@Narsil
Narsil / pure_torch.py
Created November 10, 2022 15:06
Loading a safetensors file with pure torch only
import mmap
import torch
import json
import os
from huggingface_hub import hf_hub_download
def load_file(filename, device):
with open(filename, mode="r", encoding="utf8") as file_obj:
with mmap.mmap(file_obj.fileno(), length=0, access=mmap.ACCESS_READ) as m:
@PurpleBooth
PurpleBooth / README-Template.md
Last active May 19, 2024 06:34
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Custom Scrollbar Windows 95 Style</title>
<style>
body {
margin: 0;
font-family: Arial, sans-serif;
@nufeng1999
nufeng1999 / Win11_taskbar_chg2_Win10_taskbar.md
Last active May 19, 2024 06:27
[Windows 11 taskbar change to Windows 10 taskbar] #Windows 11 #Windows 10 #taskbar

Win11_taskbar_chg2_Win10_taskbar.reg

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced]

"Start_ShowClassicMode"=dword:00000001

@Ravarcheon
Ravarcheon / spectralRotation.py
Last active May 19, 2024 06:25
rotates an audio file by 90 degrees in the spectrum while being a reversible process with minimal loss (only floating point errors which are like -150 dB but thats literally silence ahaha~)
import numpy as np
import soundfile as sf
from scipy.fftpack import fft, ifft
def rotateSignal(signal,flip):
if flip:
signal = signal[::-1]
x = np.concatenate((signal, signal[1:][::-1])) # concatenating the array with a reverse of itself makes it such that the fourier transform doesn't layer over a reversed version of itself in the inverse fft
rotSig = ifft(x)
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Custom Scrollbar Windows 95 Style</title>
<style>
body {
margin: 0;
font-family: Arial, sans-serif;
@kenthua
kenthua / I2C_LCD_driver.py
Last active May 19, 2024 06:20
16x2 lcd on armbian
# -*- coding: utf-8 -*-
# Original code found at:
# https://gist.github.com/DenisFromHR/cc863375a6e19dce359d
"""
Compiled, mashed and generally mutilated 2014-2015 by Denis Pleic
Made available under GNU GENERAL PUBLIC LICENSE
# Modified Python I2C library for Raspberry Pi
# as found on http://www.recantha.co.uk/blog/?p=4849