Skip to content

Instantly share code, notes, and snippets.

View skammer's full-sized avatar
🐱
may or may not be a cat

Max Vasiliev skammer

🐱
may or may not be a cat
View GitHub Profile
@nopbxlr
nopbxlr / Ninebot_BMS_Emulator.ino
Last active December 4, 2023 01:38
Ninebot_BMS_Emulator (STILL WIP)
#define BAUDRATE 115200
#define PRE_MSB 0x5A
#define PRE_LSB 0xA5
#define CMD_READ 0x01
#define CMD_WRITE 0x02
#define CMD_REPLY 0x04
#define CMD_WR_REPLY 0x05
#define c_MIN_BATT_V 3500
#define c_MAX_BATT_V 4200
#define c_BATT_CAP 15300
@arturo182
arturo182 / bom2grouped_csv_jlcpcb.xsl
Last active June 14, 2024 08:32
A KiCad BOM script for generating JLCPCB PCBA-compatible files!
<!--XSL style sheet to convert EESCHEMA XML Partlist Format to grouped CSV BOM Format
Copyright (C) 2014, Wolf Walter.
Copyright (C) 2013, Stefan Helmert.
Copyright (C) 2018, Kicad developers.
Copyright (C) 2019, arturo182.
GPL v2.
Functionality:
Generation of JLCPCB PCBA compatible BOM
@munificent
munificent / generate.c
Last active May 14, 2024 05:30
A random dungeon generator that fits on a business card
#include <time.h> // Robert Nystrom
#include <stdio.h> // @munificentbob
#include <stdlib.h> // for Ginny
#define r return // 2008-2019
#define l(a, b, c, d) for (i y=a;y\
<b; y++) for (int x = c; x < d; x++)
typedef int i;const i H=40;const i W
=80;i m[40][80];i g(i x){r rand()%x;
}void cave(i s){i w=g(10)+5;i h=g(6)
+3;i t=g(W-w-2)+1;i u=g(H-h-2)+1;l(u
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.chrome.options import Options
import xml.dom.minidom as minidom
import pycountry
import traceback
chrome_options = Options()
chrome_options.add_argument("--headless")
@tkachenko1503
tkachenko1503 / why-do-we-need-types-in-javascript.md
Last active April 21, 2020 10:35
Do we need types in JavaScript? Or maybe not?

This is my lightning talk submission to ReactiveConf 2018 https://reactiveconf.com/

In this talk, I want to share my experience gained during the development of frontend applications in several programming languages.

I think it's not a secret for anybody that developing large JavaScript applications is not so easy as it seems at first glance. We all want something simpler and more reliable. Therefore, many developers and even entire companies switch to different, compiled in JavaScript, programming languages. The bulk of such transitions is accounted for TypeScript and flow, and often, developers faced with more problems than they were before.

I wasn't the exception. Moving to a new project, I started using TypeScript and was disappointed. Luckily in my next project I used ClojureScript and it was like everything is illuminated!

(ns css.core
(:require [garden.core :refer [css]]
[garden.stylesheet :refer [at-keyframes at-media]]))
(def styles (atom {})) ;; styles cache
;; ignore this code, it generates unique short class names
(def cls->id (atom {}))
(def vc* (atom {:id 0
@dmnsgn
dmnsgn / WebGL-WebGPU-frameworks-libraries.md
Last active July 18, 2024 10:09
A collection of WebGL and WebGPU frameworks and libraries

A non-exhaustive list of WebGL and WebGPU frameworks and libraries. It is mostly for learning purposes as some of the libraries listed are wip/outdated/not maintained anymore.

Engines and libraries ⚙️

Name Stars Last Commit Description
three.js ![GitHub
@raecoo
raecoo / console.save.js
Last active June 23, 2024 09:05
Save JSON object to file in Chrome Devtool
// e.g. console.save({hello: 'world'})
(function(console){
console.save = function(data, filename){
if(!data) {
console.error('Console.save: No data')
return;
}
if(!filename) filename = 'console.json'
if(typeof data === "object"){
data = JSON.stringify(data, undefined, 4)

FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.


Effective Engineer - Notes

What's an Effective Engineer?

@jellea
jellea / core.clj
Created October 31, 2016 23:13
Lastpass csv to Keepass xml converter
(ns last2kee.core
(:require [clojure.set :as set]
[clojure.data.csv :as csv]
[clojure.data.xml :as xml]
[clojure.string :as string]
[clojure.java.io :as io]))
(defn csvvec-to-map [csvdata]
(map #(zipmap (first csvdata) %) (rest csvdata)))