Skip to content

Instantly share code, notes, and snippets.

View 4ndv's full-sized avatar
😼
cat goes meow

Andrey Viktorov 4ndv

😼
cat goes meow
View GitHub Profile
@4ndv
4ndv / scales.rs
Last active April 15, 2024 17:41
use btleplug::api::bleuuid::uuid_from_u16;
use btleplug::api::{Central, CentralEvent, Manager as _, Peripheral as _, ScanFilter, WriteType};
use btleplug::platform::{Adapter, Manager, Peripheral};
use clap::Command;
use futures::stream::StreamExt;
use std::error::Error;
use std::fmt::Debug;
use std::time::{SystemTime, UNIX_EPOCH};
fn cli() -> Command {
# frozen_string_literal: true
require "bundler/inline"
gemfile(true) do
source "https://rubygems.org"
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
gem "activerecord", "= 7.1.2"
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@4ndv
4ndv / docker-compose.yml
Last active November 22, 2021 05:37
Zookeeper + Kafka compose file (based on https://www.baeldung.com/ops/kafka-docker-setup)
version: '3'
services:
zookeeper:
image: confluentinc/cp-zookeeper:latest
environment:
ZOOKEEPER_CLIENT_PORT: 2181
ZOOKEEPER_TICK_TIME: 2000
ports:
- 22181:2181
@4ndv
4ndv / launch.json
Last active October 24, 2018 08:01
launch.json for the rails debug
{
"version": "0.2.0",
"configurations": [
{
"name": "Rails server",
"type": "Ruby",
"request": "launch",
"cwd": "${workspaceRoot}",
"program": "${workspaceRoot}/bin/rails",
"args": [
@4ndv
4ndv / danted.conf
Last active May 24, 2018 16:47
Telegram danted.conf
# /etc/danted.conf
logoutput: syslog /var/log/sockd.log
internal: eth0 port = 1080
external: eth0
clientmethod: none
socksmethod: username
@4ndv
4ndv / README.md
Last active April 5, 2017 16:37 — forked from RandomEtc/README.md
D3 Bar Chart Update Pattern

Keybase proof

I hereby claim:

  • I am 4ndv on github.
  • I am andv (https://keybase.io/andv) on keybase.
  • I have a public key whose fingerprint is C088 3A2D 3142 A491 8E43 653D B1AC B827 B4AC F1EF

To claim this, I am signing this object: