Skip to content

Instantly share code, notes, and snippets.

View Tolsi's full-sized avatar
⌨️
I am jumping on the keyboard

Sergey Tolmachev Tolsi

⌨️
I am jumping on the keyboard
View GitHub Profile
@beesandbombs
beesandbombs / spinCubes.pde
Created February 3, 2023 15:10
spinning cubes
float[][] result;
float t, c;
float ease(float p) {
p = c01(p);
return 3*p*p - 2*p*p*p;
}
float ease(float p, float g) {
// by dave @beesandbombs :)
float[][] result;
float t, c;
float ease(float p) {
p = c01(p);
return 3*p*p - 2*p*p*p;
}
@chrisdiana
chrisdiana / opz-cheatsheet.md
Last active March 29, 2024 01:25
OP-Z Cheatsheet

OP-Z Cheatsheet

General

  • Play: Press Play
  • Stop: Press Stop
  • Sequence: Hold Trig + key
  • Sequence v2: Hold Rec + keys
  • Live Record: Hold Rec + Play + key/Play
  • Stop Recording: Press Rec

Ledger Nano X : Bluetooth Low Energy Communication

1.0

  • Public release

About

@amcolash
amcolash / ATTiny + Micronucleus
Last active March 11, 2024 00:19
ATTiny85 + micronucleus using an AVR programmer
This gist is a list of instructions that I used to program my ATTiny85s with Micronucleus. They worked for me, but your mileage may vary! I would highly recommend starting by looking at the SparkFun article linked at the bottom for schematics and more in-depth info. This gist is mostly just a copy/paste list.
## Required:
- ATTiny85
- AVR programmer
- 1 uF capacitor
- Micronucleus FW: https://github.com/micronucleus/micronucleus/releases
- avrdude: http://www.nongnu.org/avrdude/
## Setup:
@cab404
cab404 / checkmacs.sh
Last active April 3, 2018 07:05
MAC address checker for moscow metro
#!/bin/bash
# script for finding userdata from a list of macs.
# for educational purposes only, of course.
INPUT=$1
SSID=MT_FREE
DEV=${2:-wlp1s0}
OUTDIR=check-`date +%d-%m-%yT%H:%M:%S`
function jsonf() { python -c 'import json; json.dump(json.load(open("/dev/stdin", "r")), open("/dev/stdout", "w"), indent=2)'; echo; }
package org.bluetooth.bledemo;
import java.util.HashMap;
import android.util.SparseArray;
public class BleNamesResolver {
private static HashMap<String, String> mServices = new HashMap<String, String>();
private static HashMap<String, String> mCharacteristics = new HashMap<String, String>();
private static SparseArray<String> mValueFormats = new SparseArray<String>();
@gubatron
gubatron / hack_n_debug_bitcoin_with_gdb_or_LLDB.md
Last active January 18, 2023 16:21
How to build bitcoin and debug with GDB or LLDB

Hack and Debug with gdb or LLDB, using Bitcoin's code as an example

/*
 * Copyright CC0 Angel Leon <@gubatron>
 */

Update: I believe now it's better to use lldb, at least on MacOS, here's a LLDB to GDB command map

Here's how to use gdb to debug issues you might be having hacking bitcoinclassic (or any other C++ program)

@sgdan
sgdan / gzip.kts
Last active April 4, 2024 06:02
Kotlin code to compress/uncompress a string with gzip
import java.io.ByteArrayOutputStream
import java.io.File
import java.nio.charset.StandardCharsets.UTF_8
import java.util.zip.GZIPInputStream
import java.util.zip.GZIPOutputStream
fun gzip(content: String): ByteArray {
val bos = ByteArrayOutputStream()
GZIPOutputStream(bos).bufferedWriter(UTF_8).use { it.write(content) }
return bos.toByteArray()
@rodricels
rodricels / .tmux.conf
Last active April 18, 2024 04:11
tmux configuration, mouse copy & paste added
# My tmux configuration, partly based on https://github.com/wbkang/wbk-stow/blob/master/tmux-config/.tmux.conf
# Scroll History
set -g history-limit 50000
# show messages for 4 seconds instead
set -g display-time 4000
# set first window to index 1 (not 0) to map more to the keyboard layout
set-option -g renumber-windows on