Skip to content

Instantly share code, notes, and snippets.

@inkss
inkss / #readme.md
Last active May 2, 2024 16:44
IPV6 直播源

个人向直播源

精简了上游直播源内容,仅保留个人所需的。

一、订阅地址

TVM3U

https://gist.githubusercontent.com/inkss/0cf33e9f52fbb1f91bc5eb0144e504cf/raw/ipv6.m3u
@cecilemuller
cecilemuller / 2019-https-localhost.md
Last active May 2, 2024 16:43
How to create an HTTPS certificate for localhost domains

How to create an HTTPS certificate for localhost domains

This focuses on generating the certificates for loading local virtual hosts hosted on your computer, for development only.

Do not use self-signed certificates in production ! For online certificates, use Let's Encrypt instead (tutorial).

@0xjac
0xjac / private_fork.md
Last active May 2, 2024 16:43
Create a private fork of a public repository

The repository for the assignment is public and Github does not allow the creation of private forks for public repositories.

The correct way of creating a private frok by duplicating the repo is documented here.

For this assignment the commands are:

  1. Create a bare clone of the repository. (This is temporary and will be removed so just do it wherever.)

git clone --bare git@github.com:usi-systems/easytrace.git

@rvrsh3ll
rvrsh3ll / windows-keys.md
Created February 18, 2024 22:44
Windows Product Keys

NOTE

These are NOT product / license keys that are valid for Windows activation.
These keys only select the edition of Windows to install during setup, but they do not activate or license the installation.

Index

Scaling your API with rate limiters

The following are examples of the four types rate limiters discussed in the accompanying blog post. In the examples below I've used pseudocode-like Ruby, so if you're unfamiliar with Ruby you should be able to easily translate this approach to other languages. Complete examples in Ruby are also provided later in this gist.

In most cases you'll want all these examples to be classes, but I've used simple functions here to keep the code samples brief.

Request rate limiter

This uses a basic token bucket algorithm and relies on the fact that Redis scripts execute atomically. No other operations can run between fetching the count and writing the new count.

@jylopez
jylopez / stripe_country_codes.js
Last active May 2, 2024 16:35
Stripe Country Codes
[
{ country: 'Australia', code: 'AU' },
{ country: 'Austria', code: 'AT' },
{ country: 'Belgium', code: 'BE' },
{ country: 'Brazil', code: 'BR' },
{ country: 'Bulgaria', code: 'BG' },
{ country: 'Canada', code: 'CA' },
{ country: 'Croatia', code: 'HR' },
{ country: 'Cyprus', code: 'CY' },
{ country: 'Czech Republic', code: 'CZ' },
@dvygolov
dvygolov / showbmadacclimit.js
Created January 11, 2023 09:33
This script shows Ad Account creation limit for all Business Managers
var bms = await getAllBms();
for (let i = 0; i < bms.data.length; i++) {
let bm = bms.data[i];
console.log(
`%cProcessing BM: ${bm.name}`,
"font-size:15px;font-weight:bold;"
);
console.log(`Ad Account creation limit is: ${await getBMAdAccountCreationLimit(bm.id)}`);
}
@johnchandlerburnham
johnchandlerburnham / ATaxonomyOfSelfTypes.md
Last active May 2, 2024 16:33
A Taxonomy of Self Types

A Taxonomy of Self-Types

Part I: Introduction to Self-Types

Datatypes in the Formality programming language are built out of an unusual structure: the self-type. Roughly speaking, a self-type is a type that can depend or be a proposition on it's own value. For instance, the consider the 2 constructor datatype Bool:

@james-d
james-d / PlutoExplorer.java
Last active May 2, 2024 16:33
Zoomable and Pannable JavaFX ImageView Example
import javafx.application.Application;
import javafx.beans.property.ObjectProperty;
import javafx.beans.property.SimpleObjectProperty;
import javafx.geometry.Insets;
import javafx.geometry.Point2D;
import javafx.geometry.Pos;
import javafx.geometry.Rectangle2D;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.control.Hyperlink;
// ==UserScript==
// @name TweetXer
// @namespace https://gist.github.com/lucahammer/a4d1e957ec9e061e3cccafcbed599e16/
// @version 0.5
// @description Delete all your Tweets for free.
// @author Luca
// @match https://twitter.com/*
// @icon https://www.google.com/s2/favicons?domain=twitter.com
// @grant unsafeWindow
// ==/UserScript==