Skip to content

Instantly share code, notes, and snippets.

View beautyfree's full-sized avatar
😼

Alexey Elizarov beautyfree

😼
View GitHub Profile
@ganapativs
ganapativs / iTerm2 + oh-my-zsh + Pure theme + zsh plugins setup.md
Last active July 15, 2025 20:04
iTerm2 + oh-my-zsh + Pure theme + zsh plugins setup
@INQTR
INQTR / axios-interceptors-refresh-token.js
Last active March 2, 2025 13:30
Axios interceptors token refresh for few async requests. ES6
import axios from "axios";
import { settings } from "../settings";
import { authAPI } from ".";
const request = axios.create({
baseURL: settings.apiV1,
});
request.interceptors.request.use(
(config) => {
@synecdocheNORTH
synecdocheNORTH / script.babel
Created January 9, 2019 19:56
Three.js Smoke Cloud
let cam, scene, renderer,
clock, smokeMaterial,
h, w,
smokeParticles = [];
const animate = () => {
let delta = clock.getDelta();
requestAnimationFrame(animate);
@lenkan
lenkan / use-location.js
Created March 2, 2019 18:26
React hook that keeps up to date with the current location.
// @ts-check
import { useState, useEffect } from 'react'
function getCurrentLocation () {
return {
pathname: window.location.pathname,
search: window.location.search
}
}
@bgulla
bgulla / jetson_nano_cheatsheet.md
Last active September 5, 2022 21:29
Notes related to the NVIDIA Jetson Nano dev kit

Jetson Nano Cheatsheet

image text

Below are my personal notes related to the Nvidia Jetson Nano Dev-board.

Performance Management

Nvidia allows your to fine tune the performance of your Jetson nano. More on this here.

Show the current settings

sudo /usr/bin/jetson_clocks.sh --show
@zmts
zmts / fingerprint.md
Last active February 1, 2025 11:44
Get browser fingerprint example (fingerprintjs2)

Get browser fingerprint example (fingerprintjs2)

import * as Fingerprint2 from 'fingerprintjs2'
import * as UAParser from 'ua-parser-js'

function _getFingerprint () {
  return new Promise((resolve, reject) => {
    async function getHash () {
      const options = {
declare const IS_ACTION_FETCH: unique symbol
/**
* Fetch fabric with statuses actions
* @param {(payload: Payload) => Promise<Result>} fetcher
* @param {{
* onDone?: (result: Result, store: Store) => void
* onFail?: (error: unknown, store: Store) => void
* }} hooks
* @returns {{
@artalar
artalar / atom-reactions.js
Last active October 21, 2020 10:15
atom-reactions
// // BEFORE
// export const doSome = declareAction(
// (payload, store) => some()
// )
// export const myAtom = declareAtom(initState, on => [
// on(doSome, (state, payload) => state + payload),
// ])
// // NOW
@theprincy
theprincy / hetzner-proxmox-docker.sh
Last active February 15, 2023 11:02 — forked from rwenz3l/hetzner-proxmox-docker.sh
Hetzner Dedicated with Debian 10 and Proxmox 6 (LXC) + Docker-CE + Portainer [NAT]
#############################################
### Proxmox V & Docker-CE + Portainer #
#############################################
## Rescue System
# Erase other disks
dd if=/dev/zero of=/dev/sda bs=1M count=100
dd if=/dev/zero of=/dev/sdb bs=1M count=100
# You can install debian 10 via the guide:
@rmcdongit
rmcdongit / macOS_SytemPrefs.md
Last active July 18, 2025 02:53
Apple System Preferences URL Schemes

macOS 10.15 System Preference Panes

Below are a list of System Preference pane URLs and paths that can be accessed with scripting to assist users with enabling macOS security settings without having to walk them through launching System Preferences, finding panes, and scrolling to settings. Not all panes have an accessible anchor and some are OS specific.

To find the Pane ID of a specific pane, open the System Preferences app and select the desired Preference Pane. With the pane selected, open the ScriptEditor.app and run the following script to copy the current Pane ID to your clipboard and display any available anchors:

tell application "System Preferences"
	set CurrentPane to the id of the current pane
	set the clipboard to CurrentPane