Skip to content

Instantly share code, notes, and snippets.

@frk1
frk1 / ipv4.txt
Last active April 20, 2024 08:01
Get Netflix IP ranges
# 2017-10-01T14:14:44+00:00
108.175.32.0/20
108.175.34.0/24
108.175.35.0/24
192.173.64.0/18
198.38.100.0/24
198.38.101.0/24
198.38.108.0/24
198.38.109.0/24
@kohya-ss
kohya-ss / gradio_llm.py
Last active April 20, 2024 08:00
gradioでLLMを利用する簡易クライアント
# Apache License 2.0
# 使用法は gist のコメントを見てください
import argparse
from typing import List, Optional, Union, Iterator
from llama_cpp.llama_chat_format import _convert_completion_to_chat, register_chat_completion_handler
import llama_cpp.llama_types as llama_types
from llama_cpp.llama import LogitsProcessorList, LlamaGrammar
from llama_cpp import Llama, llama_chat_format
import gradio as gr
@hakre
hakre / imap-attachment.php
Created April 11, 2012 22:50
Save attachments from imap messages to disk.
<?php
/**
* imap-attachment.php
*
* @author hakre <hakre.wordpress.com>
* @link http://stackoverflow.com/questions/9974334/how-to-download-mails-attachment-to-a-specific-folder-using-imap-and-php
*/
/**
* Utility Class
@pedrouid
pedrouid / webcrypto-examples.md
Created December 15, 2018 01:07
Web Cryptography API Examples
@qoomon
qoomon / conventional_commit_messages.md
Last active April 20, 2024 07:54
Conventional Commit Messages

Conventional Commit Messages

See how a minor change to your commit message style can make a difference.

Tip

Have a look at git-conventional-commits , a CLI util to ensure these conventions and generate verion and changelogs

Commit Message Formats

Default

@defunkt
defunkt / zombies.md
Created December 29, 2010 22:57
—All You Zombies— by Robert A. Heinlein

All You Zombies

2217 Time Zone V (EST) 7 Nov. 1970--NTC-- "Pop's Place": I was polishing a brandy snifter when the Unmarried Mother came in. I noted the time---10:17 P. M. zone five, or eastern time, November 7th, 1970. Temporal agents always notice time and date; we must.

The Unmarried Mother was a man twenty--five years old, no taller than I am, childish features and a touchy temper. I didn't like his looks---I never had---but he was a lad I was here to recruit, he was my boy. I gave him my best barkeep's smile.

Maybe I'm too critical. He wasn't swish; his nickname came from what he always said when some nosy type asked him his line: "I'm an unmarried mother." If he felt less than murderous he would add: "at four cents a word. I write confession stories."

If he felt nasty, he would wait for somebody to make something of it. He had a lethal style of infighting, like a female cop---reason I wanted him. Not the only one.

//
// BottomSheetView.swift
//
// Created by Majid Jabrayilov
// Copyright © 2019 Majid Jabrayilov. All rights reserved.
//
import SwiftUI
fileprivate enum Constants {
static let radius: CGFloat = 16
@ayebrian
ayebrian / vmware.md
Last active April 20, 2024 07:45
VMware ESXi 8 / vCenter 8 / Workstation 17 8 license key 2024

Free VMware license keys, they should work. It works for all cores on your host system(ESXi).

vCenter Server 8 Standard

Key Tested
4F282-0MLD2-M8869-T89G0-CF240
0F41K-0MJ4H-M88U1-0C3N0-0A214

ESXi 8

Key Tested
@savelee
savelee / index.html
Created December 6, 2019 17:20
A best practice for streaming audio from a browser microphone to Dialogflow or Google Cloud STT by using websockets.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>RecordRTC over Socket.io</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<script src="https://www.WebRTC-Experiment.com/RecordRTC.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/socket.io/2.3.0/socket.io.js"></script>
@arkatsy
arkatsy / zustand-internals.jsx
Last active April 20, 2024 07:34
How zustand works internally
import { useSyncExternalStore } from "react";
// For more on the useSyncExternalStore hook, see https://react.dev/reference/react/useSyncExternalStore
// The code is almost identical to the source code of zustand, without types and some features stripped out.
// Check the links to see the references in the source code.
// The links are referencing the v5 of the library. If you plan on reading the source code yourself v5 is the best way to start.
// The current v4 version contains lot of deprecated code and extra stuff that makes it hard to reason about if you're new to this.
// https://github.com/pmndrs/zustand/blob/fe47d3e6c6671dbfb9856fda52cb5a3a855d97a6/src/vanilla.ts#L57-L94
function createStore(createState) {