Skip to content

Instantly share code, notes, and snippets.

@beatzxbt
beatzxbt / orderbook_testing.py
Created March 29, 2024 13:21
fast orderbook implementation in numpy/numba
import numpy as np
from time import perf_counter_ns
from numba import njit, int64, float64, bool_
from numba.experimental import jitclass
from scipy.stats import skewnorm
from numpy.typing import NDArray
@njit(bool_[:](float64[:], float64[:]), nogil=True)
def isin(a: NDArray, b: NDArray) -> NDArray:
out = np.empty(a.size, dtype=bool_)
@y0ngb1n
y0ngb1n / docker-registry-mirrors.md
Last active March 29, 2024 15:36
国内的 Docker Hub 镜像加速器,由国内教育机构与各大云服务商提供的镜像加速服务 | Dockerized 实践 https://github.com/y0ngb1n/dockerized

Docker Hub 镜像加速器

国内从 Docker Hub 拉取镜像有时会遇到困难,此时可以配置镜像加速器。Docker 官方和国内很多云服务商都提供了国内加速器服务。

Dockerized 实践 https://github.com/y0ngb1n/dockerized

配置加速地址

Ubuntu 16.04+、Debian 8+、CentOS 7+

@steven2358
steven2358 / ffmpeg.md
Last active March 29, 2024 15:32
FFmpeg cheat sheet
@dearyangyu
dearyangyu / maya_get_mtx_relative_to_other_object.py
Created March 23, 2024 04:46 — forked from CGLion/maya_get_mtx_relative_to_other_object.py
Python for Maya - Get object's transform matrix relative to other object's transform
from maya.api.OpenMaya import MVector, MMatrix, MPoint
import maya.cmds as cmds
def get_relative_transform (node,coordinate_space_node):
node_matrix = MMatrix(cmds.xform(node, q=True, matrix=True, ws=True))
parent_matrix = MMatrix(cmds.xform(coordinate_space_node, q=True, matrix=True, ws=True))
return (node_matrix * parent_matrix.inverse())
node_a = (cmds.ls(sl=1,sn=True))[0]
node_b = (cmds.ls(sl=1,sn=True))[1]
@potibm
potibm / gist:e0dacccbacd0293c021d84d2cbce2adc
Last active March 29, 2024 15:31
GitHub Action to submit changed Urls to IndexNow
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Build Jekyll site
- name: Generate CSV with MD5 Hashes
run: |
cd build
find . -type f -exec md5sum {} + | sed 's/\.\///' | sort -t $'\t' -k 2 > file_hashes.csv
working-directory: ${{ github.workspace }}
@bmaupin
bmaupin / free-backend-hosting.md
Last active March 29, 2024 15:30
Free backend hosting
@LeZuse
LeZuse / 00_README.md
Last active March 29, 2024 15:30
Install node on Apple Silicon M1 both ARM and x86 (Rosetta)

Node.js on Apple Silicon

Node Version Manager (https://github.com/nvm-sh/nvm) works perfectly across native node installations as well as emulated Rosetta installations. The trick I am using here is to install one LTS version of node under Rosetta and another stable version as native binary.

TODO

  • find a way how to run the same node version on both platforms
@adrianhall
adrianhall / .eslintrc.js
Last active March 29, 2024 15:28
A sample .eslintrc file
var OFF = 0, WARN = 1, ERROR = 2;
module.exports = exports = {
"env": {
"es6": true
},
"ecmaFeatures": {
// env=es6 doesn't include modules, which we are using
"modules": true
@olih
olih / jq-cheetsheet.md
Last active March 29, 2024 15:24
jq Cheet Sheet

Processing JSON using jq

jq is useful to slice, filter, map and transform structured json data.

Installing jq

On Mac OS

brew install jq

NetLimiter 3
Registration name: Peter Raheli
Registration code: C99A2-QSSUD-2CSBG-TSRPN-A2BEB
NetLimiter 4
Registration Name: Vladimir Putin #2
Registration Code: XLEVD-PNASB-6A3BD-Z72GJ-SPAH7
https://www.netlimiter.com/download
# Netlimiter Full Netlimiter Activated Netlimiter cracked Netlimiter Full Version Netlimiter Serial Netlimiter keygen Netlimiter crack Netlimiter 4 serial Netlimiter 4 Crack Netlimiter 4 register Netlimiter 4 patch Netlimiter full Full version Netlimiter 4 Activated Netlimiter 4 Cracked Netlimiter Pro