Skip to content

Instantly share code, notes, and snippets.

View itanka9's full-sized avatar

Michel Beloshitsky itanka9

View GitHub Profile
@itanka9
itanka9 / index.html
Last active March 26, 2025 11:49
Empty MapGL fly
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<title>Empty MapGL fly</title>
<style>
html,
body,
#container {
@itanka9
itanka9 / index.html
Last active March 22, 2022 09:05
Mapgl Fly Around
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>2GIS Map API</title>
<meta name="description" content="Quckstart with 2GIS Map API">
<style>
html,
body,
@itanka9
itanka9 / .block
Last active December 29, 2021 17:21
Simple Map with a Marker
license: mit
FORMAT: 1A
HOST: https://demo.navixy.com/api-v2
# Sample Navixy API
This is simple example of navixy API via apiary.
## Trackers [/tracker/list]
### List All Trackers [POST]
@itanka9
itanka9 / Lottie-play.js
Created November 19, 2019 08:41
Lottie play(from, to).js
play (from, to) {
if (from !== undefined) {
this.player.setCurrentRawFrameValue(from)
}
if (to) {
this.targetFrame = to
}
this.player.setDirection(from < to ? 1 : -1)
this.player.play()
}
@itanka9
itanka9 / .block
Last active November 15, 2017 19:58 — forked from mbostock/.block
Интересное про Javascript-объекты
license: gpl-3.0
@itanka9
itanka9 / .block
Last active November 15, 2017 19:24 — forked from mbostock/.block
Cluster Dendrogram
license: gpl-3.0
height: 2000
border: no
function getContrastColor (color) {
const [RED, GREEN, BLUE] = [0, 1, 2]
const fraction = (val, pos) => parseInt(val.slice(pos * 2, pos * 2 + 2), 16)
const contrast = (fraction(color, RED) * 299 + fraction(color, GREEN) * 587 + fraction(color, BLUE) * 114) / 1000
if (contrast > 180) {
return 'rgba(0, 0, 0, 0.8)'
} else {
return 'rgba(255, 255, 255, 0.8)'
}
}
# script for stm32f1x family
#
# stm32 devices support both JTAG and SWD transports.
#
source [find target/swj-dp.tcl]
source [find mem_helper.tcl]
if { [info exists CHIPNAME] } {
set _CHIPNAME $CHIPNAME
swj_newdap $_CHIPNAME cpu -irlen 4 -ircapture 0x1 -irmask 0xf -expected-id $_CPUTAPID
if {[using_jtag]} {
jtag newtap $_CHIPNAME bs -irlen 5
}