Skip to content

Instantly share code, notes, and snippets.

@wallyqs
wallyqs / component.py
Created January 30, 2020 06:37
Coroutine Threadsafe Component for nats.py
import asyncio
import time
import logging
from threading import Thread
from nats.aio.client import Client as NATS
from nats.aio.errors import ErrConnectionClosed, ErrTimeout
class Component:
component = None
@jthrilly
jthrilly / package.json
Created January 29, 2019 09:48 — forked from mallendeo/package.json
Record gsap animations frame by frame with puppeteer
{
"name": "gsap-to-video",
"version": "1.0.0",
"main": "index.js",
"license": "MIT",
"dependencies": {
"fs-extra": "^7.0.0",
"puppeteer": "^1.7.0"
}
}
@dmfigol
dmfigol / asyncio_loop_in_thread.py
Last active April 21, 2024 17:32
Python asyncio event loop in a separate thread
"""
This gist shows how to run asyncio loop in a separate thread.
It could be useful if you want to mix sync and async code together.
Python 3.7+
"""
import asyncio
from datetime import datetime
from threading import Thread
from typing import Tuple, List, Iterable
@mallendeo
mallendeo / package.json
Last active July 10, 2023 13:46
Record gsap animations frame by frame with puppeteer
{
"name": "gsap-to-video",
"version": "1.0.0",
"main": "index.js",
"license": "MIT",
"dependencies": {
"fs-extra": "^7.0.0",
"puppeteer": "^1.7.0"
}
}
@jgrant41475
jgrant41475 / YouTube Video Data Tool.html
Last active March 26, 2024 10:54
Fetches YouTube Video Information and creates a json-ld Video Object
<!doctype html>
<html class="no-js" lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Foundation | Welcome</title>
<link rel="stylesheet" href="css/foundation.css" />
</head>
<body>
<div class="row">
@rollacaster
rollacaster / algebraic-structures.txt
Created October 21, 2017 13:01
Algebraic Structures
https://drboolean.gitbooks.io/mostly-adequate-guide
http://www.tomharding.me/2017/03/03/fantas-eel-and-specification/
https://egghead.io/courses/professor-frisby-introduces-composable-functional-javascript
https://github.com/fantasyland/fantasy-land
@SamusAranX
SamusAranX / readme.md
Last active May 21, 2020 01:29
A Python script that automates some complicated aspects of ffmpeg
@mixonic
mixonic / readme.md
Last active April 21, 2021 23:49
Services for Glimmer.js

Setup

In config/environment.js:

// config/environment.js
'use strict';

/*
 * Mostly this is the stock module config.
@judy2k
judy2k / parse_dotenv.bash
Created March 22, 2017 13:34
Parse a .env (dotenv) file directly using BASH
# Pass the env-vars to MYCOMMAND
eval $(egrep -v '^#' .env | xargs) MYCOMMAND
# … or ...
# Export the vars in .env into your shell:
export $(egrep -v '^#' .env | xargs)
@jessejanderson
jessejanderson / the_abcs_of_otp.md
Last active March 13, 2024 11:23
The ABCs of OTP