Skip to content

Instantly share code, notes, and snippets.

@zoten
zoten / .iex.exs
Created April 24, 2023 10:48 — forked from DaniruKun/.iex.exs
My custom global IEx script file that is preloaded before each IEx session. Adds some convenience functions.
IO.puts("Using .iex.exs file loaded from #{__DIR__}/.iex.exs")
defmodule Util do
def atom_status do
limit = :erlang.system_info(:atom_limit)
count = :erlang.system_info(:atom_count)
IO.puts("Currently using #{count} / #{limit} atoms")
end
@zoten
zoten / jsonapi_oas.yml
Created November 25, 2021 11:36 — forked from naesean/jsonapi_oas.yml
OpenAPI 3.0 schemas that comply with the JSON:API 1.0 specification
JSONAPIObject:
description: Includes the current JSON:API version for this specification as well as optional meta information
type: object
required:
- version
properties:
version:
type: string
default: '1.0'
example: '1.0'
@zoten
zoten / bitethebot.user.js
Last active August 8, 2018 12:52 — forked from nappa85/bitethebot.user.js
BiteTheBot hack
// ==UserScript==
// @include https://web.telegram.org/*
// ==/UserScript==
var url = "https://web.telegram.org/#/im?p=@bitethebot";
const action_timeout = 6000;
const min_timeout = 60000;
const max_timeout = 300000;
const start_timeout = 5000;
const max_timeout_delta = max_timeout - min_timeout;