Skip to content

Instantly share code, notes, and snippets.

View maks's full-sized avatar

Maksim Lin maks

View GitHub Profile
@sonique6784
sonique6784 / HelloWorldKt.md
Created October 19, 2024 09:57
Hello World Kotlin Native

When compiling with kotlinc-native compiler, the binary link with the system libraries such as libc++.

❯ ls -lh
total 1044
-rw-r--r--@ 1 sonique  staff    45B 19 Oct 20:43 helloworld.kt
-rwxr-xr-x@ 1 sonique  staff   1.0M 19 Oct 20:47 program.kexe
@todbot
todbot / synthy-balls.py
Last active October 4, 2024 13:27
use rotary encoder to launch balls that play notes when bouncing in CircuitPython
# synthy-balls.py -- use rotary encoder to launch balls that play notes when bouncing
# 20 Aug 2024 - @todbot / Tod Kurt
# video demo: https://youtu.be/cCTPtk6KQQk
import time, random, math
import board
import busio, displayio, terminalio
import rotaryio, keypad
import audiobusio, audiocore, audiomixer, synthio
import gc9a01
#from adafruit_display_text import bitmap_label as label
@sma
sma / forth.dart
Last active August 4, 2023 02:07
a tiny forth interpreter
import 'package:flutter/material.dart';
void main() {
Forth().run('V: count 5 ! : inc dup @ 1 + ! ; '
'[ [ text ] count builder [ count inc ] " Increment text button ] '
'list column app run');
}
typedef Impl = void Function(Forth f);
@dsandler
dsandler / gist:1f94e95b9ea6cc7d5ec338c41e4b0bcd
Created November 18, 2022 00:31
sloppy static webfinger for apache
# www/.htaccess
RewriteRule ^[.]well-known/webfinger.*$ /profile/me [L]
# www/profile/.htaccess
Header set Content-Type: application/jrd+json
Header set Access-Control-Allow-Origin: "*"
# www/profile/me
{
"subject": "acct:[email protected]",
@repi
repi / crate-health.md
Last active July 30, 2024 17:22
Guidelines on evaluating health & quality of third-party crates at Embark

What to evaluate and consider before adding usage of new third-party crates.

These are not exact requirements but questions to investigate and discuss to help reason around the health, safety, maintainability, and more around crates.

This can also be read as an opinionated guide for crate authors of what our (Embark's) guidelines and recommendations are, though should not be taken too literally.

Legend: 🔒 Must have, ⭐️ Should have, 👍 Nice to have, ℹ️ Info

@ftsf
ftsf / transposeinkey.lua
Created January 27, 2022 08:39
Synthesizer V - Transpose In Key Script
function getClientInfo()
return {
name = "Transpose In Key",
author = "impbox",
versionNumber = 1,
minEditorVersion = 0
}
end
function getTranslations(langCode)
@chmanie
chmanie / connectall.rb
Created January 26, 2021 18:02
Connect all MIDI inputs to all MIDI outputs (except themselves). Supports multi-port devices
#!/usr/bin/ruby
t = `aconnect -i -l`
$devices = {}
$device = 0
t.lines.each do |l|
match = /client (\d*)\:((?:(?!client).)*)?/.match(l)
# we skip empty lines and the "Through" port
unless match.nil? || match[1] == '0' || /Through/=~l
$device = match[1]
@mhadaily
mhadaily / Update website if there is new servicer worker update found.md
Created November 14, 2020 14:14
Use it in your index.html file in Flutter Web.
function invokeServiceWorkerUpdateFlow() {
  // you have a better UI here, reloading is not a great user experince here.
  const confirmed = confirm('New version of the app is available. Refresh now');
  if (confirmed) {
    window.location.reload();
  }
}
async function handleServiceWorker() {
@slightfoot
slightfoot / order_progress.dart
Last active July 1, 2023 16:02
Custom Order progress bar example - by Simon Lightfoot - 26/10/2020 - Using keys to access other parts of the UI in your RenderObject
// MIT License
//
// Copyright (c) 2020 Simon Lightfoot
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions: