Skip to content

Instantly share code, notes, and snippets.

@throwaway96
throwaway96 / puttygen-webos.md
Last active May 6, 2024 16:57
Creating an SSH key with PuTTYgen for use on webOS TVs

How to Create an SSH Key for webOS with PuTTYgen

Introduction

This is a guide aimed at Windows users who want to set up public key SSH authentication for their webOS TVs. It is assumed that your TV is rooted.

This guide does not cover the Developer Mode SSH server on port 9922, although much of it still applies to that.

The SSH key that will be created can be used in applications such as PuTTY, WinSCP, and Filezilla. You'll be able to connect to your TV without having to type a password. You can even set the username in advance for one-click connections.

On other platforms (e.g., Linux), you're probably going to want to use ssh-keygen.

@gene1wood
gene1wood / batch-delete-gmail-emails.js
Last active May 6, 2024 16:55
A Google Apps Script script to bulk delete large amounts of email in Gmail while avoiding the error #793 which Gmail encounters normally
/*
This script, when used with Google Apps Scripts, will delete 400 emails and
can be triggered to run every few minutes without user interaction enabling you
to bulk delete email in Gmail without getting the #793 error from Gmail.
Google returns a maximum of 500 email threads in a single API call.
This script fetches 400 threads in case 500 threads is causing timeouts
Configure the search query in the code below to match the type of emails
you want to delete
@increpare
increpare / word frequency from the the telegram group "toki pona taso sin"
Last active May 6, 2024 16:54
toki pona letter/syllable/word frequency statistics based on #toki-pona-taso on the ma pona pi toki pona discord server. Second file has some stats from "toki pona taso sin" on telegram.
none of the following data is used in the other file - it's just a different data source. The track eachother pretty well though!
(64218 words in total)
li 4647
mi 4143
e 3597
toki 2905
ni 2811
pona 2692
a 2126
@Arvinje
Arvinje / authHandler.ts
Created December 31, 2019 00:37
Lambda Authorizer for AWS API Gateway in Typescript
import axios from 'axios'
import jwt from 'jsonwebtoken'
import jwkToPem from 'jwk-to-pem'
import { AuthResponse, CustomAuthorizerEvent, PolicyDocument } from 'aws-lambda'
import { AxiosError, AuthError, ValidationError } from '../../shared/errors'
// For AWS Cognito: https://cognito-idp.<region>.amazonaws.com/<user pool id>
// refer to: http://amzn.to/2fo77UI
const iss = process.env.ISS
# This supports merging as many adapters as you want.
# python merge_adapters.py --base_model_name_or_path <base_model> --peft_model_paths <adapter1> <adapter2> <adapter3> --output_dir <merged_model>
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
import torch
import os
import argparse
@nandorojo
nandorojo / React Navigation Shared Element Transitions.md
Last active May 6, 2024 16:52
Shared Element Transitions with React Navigation and Expo (2019)

Shared Element Transitions with React Navigation and Expo (2019)

It's 2019, and creating smooth shared element transitions in react native (& expo!) is finally easy.

Ideally, as Pablo Stanley suggests, your app's navigation will use these shared transitions for similar components that appear across screens.

Is it possible to achieve the great experience above using react-native/expo? Now it is.

@An-Toha
An-Toha / ESP32_selftemp_en.ino
Created August 31, 2022 14:02
This is sketch for internal temperature sensor ESP32 CPU. * The main ideas are: * to ignore 53.3 (128 before converting to Celsius); * WiFi must be connected, if else you'll get 53.3 (128) only. * * Tested in AI Thinker ESP32 Cam module. Can be add to standard camera example in Arduino. * While ESP32 Cam module was idle - the temperature was aro…
/*This is sketch for internal temperature sensor ESP32 CPU.
* The main ideas are:
* to ignore 53.3 (128 before converting to Celsius);
* WiFi must be connected, if else you'll get 53.3 (128) only.
*
* Tested in AI Thinker ESP32 Cam module. Can be add to standard camera example in Arduino.
* While ESP32 Cam module was idle - the temperature was around 47*C.
* While camera video stream was on - the temperature was rising to around 57*C.
* See temperature values in serial monitor at 115200.
* Best regards, Anton S
@jinjier
jinjier / 250.csv
Last active May 6, 2024 16:50
JavDB Top 250 movies code list. [Updated at 2024/02]
1 LAFBD-41
2 SSNI-497
3 ABP-984
4 IPX-580
5 IPX-811
6 IPX-177
7 STARS-804
8 SMBD-115
9 ABP-968
10 ABF-017
@psamaan
psamaan / country
Last active May 6, 2024 16:49
Countries Select Option List
<select name="Country">
<option value="" selected="selected">Select Country</option>
<option value="Afghanistan">Afghanistan</option>
<option value="Albania">Albania</option>
<option value="Algeria">Algeria</option>
<option value="American Samoa">American Samoa</option>
<option value="Andorra">Andorra</option>
<option value="Angola">Angola</option>
<option value="Anguilla">Anguilla</option>
<option value="Antarctica">Antarctica</option>
@gabe565
gabe565 / change-arc-icon.md
Last active May 6, 2024 16:49
Change Arc Browser Icon

Change Arc Browser Icon

arc

A collection of commands that change the Arc Browser icon.

Commands

Theme Command
Candy Arc defaults write company.thebrowser.Browser currentAppIconName candy