Skip to content

Instantly share code, notes, and snippets.

View divan's full-sized avatar

Ivan Danyliuk divan

View GitHub Profile
@tdolsen
tdolsen / README.md
Last active April 1, 2023 03:06
EdgeDB custom scalars

EdgeDB custom scalars

A small collection of custom scalars for EdgeDB, ensuring valid values going into the database.

@davenewham
davenewham / gist:220850ca51667d559bbe9ded6856fd60
Created February 1, 2022 19:32
Convert video file to telegram webm for animated sticker
ffmpeg -i input_file.mp4 -framerate 30 -c:v libvpx-vp9 -an -vf scale=512:512 -pix_fmt yuva420p output_sticker.webm
@bus710
bus710 / bleCore.dart
Last active January 3, 2023 19:38
How to use flutter_blue in general
import 'dart:async';
/* If there is an error that points about the minSdkVersion,
change the number (minSdkVersion 16) to 19 in $PROJECT_ROOT/android/app/build.gradle */
// example: https://github.com/pauldemarco/flutter_blue/tree/master/example/lib
import 'package:flutter_blue/flutter_blue.dart'; // for BLE
import 'package:flutter/material.dart';
import 'utils/enums.dart';
class BLEData {
// "00010000-0002-1000-8000-00805f9b34fb"
@SkatingScores
SkatingScores / CoP_Critique_Sources.csv
Last active April 9, 2019 19:45
CoP/IJS Critique Sources
We can make this file beautiful and searchable if this error is corrected: It looks like row 6 should actually have 5 columns, instead of 4. in line 5.
Author,Date,Pub,Title,Link
Sandra Loosemoore,May 2003,Frogs On Ice,Code of Points Considered Harmful,http://www.frogsonice.com/skateweb/articles/code-of-points.shtml
Katherine Godfrey PhD,May 2003?,SkateFair.org,Statistical Consequences of the ISU's New Cumulative Scoring System,https://web.archive.org/web/20100131081126/http://www.skatefair.org/media/copanalysis.php
Eric Zitzewitz,06 Jan 2006,Journal of Economics and Management Strategy,Nationalism in Winter Sports Judgingand Its Lessons for OrganizationalDecision Making,https://onlinelibrary.wiley.com/doi/epdf/10.1111/j.1530-9134.2006.00092.x?referrer_access_token=Ivpkk0cEoXt8ZclKtWknKIta6bR2k8jH0KrdpFOxC65gKbkIAGZYRBVcC8hWgYQKvtKv8WnoGleJPgED3rAUMnMyjshQVd2xam8FrOsQxTpLXD9EiJnxir0SXcoZABBP3AZzyfsm3C69aVnQNClkfw%3D%3D
,16 Feb 2006,Seed Magazine,Finding Flaws in Figure Skating,https://web.archive.org/web/20120714095006/http://seedmagazine.com/content/article/finding_flaws_in_figure_skating/
John Emerson,Spring/Summer 2006?,Yale,The Computer: A Phantom Figure
@mkevac
mkevac / gist:a4cb823a560c13c9bfe914c395666828
Created December 16, 2018 14:34
YouTube subscriptions
Science
----
15x4 Talks: https://www.youtube.com/channel/UCMAr-94KkdtiSqHoRJCPK1Q
3Blue1Brown: https://www.youtube.com/channel/UCYO_jab_esuFRV4b17AJtAw
minutephysics: https://www.youtube.com/channel/UCUHW94eEFW7hkUMVaZz4eDg
Real Engineering: https://www.youtube.com/channel/UCR1IuLEqb6UEA_zQ81kwXfg
SmarterEveryDay: https://www.youtube.com/channel/UC6107grRI4m0o2-emgoDnAA
Vihart: https://www.youtube.com/channel/UCOGeU-1Fig3rrDjhm9Zs_wg
Vsauce: https://www.youtube.com/channel/UC6nSFpj9HTCZ5t-N3Rm3-HA
@eanakashima
eanakashima / vizprog.md
Last active September 25, 2018 15:39
Whoa, Pictures! A Visual History of Visual Programming (2018): References
@zsfelfoldi
zsfelfoldi / ulc.txt
Last active February 19, 2018 10:09
Here are some pointers to implementing the ULC mode. Just take a look at the relevant code, then feel free to ping me whenever you have questions (I guess it will happen a few times, I tried to document the most important parts but some of the code is still a bit messy, which I apologize for in advance).
- adding the ultra light client option:
Add an extra option for light client mode where the user can specify a text/json ULC config file that contains a list of trusted server enodes and N out of M parameters (which may depend on how many servers we are connected to, there may be 5 servers listed but we can still accept 2 out of 3 connected).
Geth parameters are implemented like this:
https://github.com/ethereum/go-ethereum/blob/master/cmd/utils/flags.go#L162
Search for LightModeFlag or LightServFlag to find out how it is wired through the code.
- requesting signed headers

This document has moved!

It's now here, in The Programmer's Compendium. The content is the same as before, but being part of the compendium means that it's actively maintained.

Go vs. Scala (Akka) Concurrency

A comparison from 2 weeks using Go.

Actors vs. Functions

Akka's central principle is that there you have an ActorSystem which runs Actors. An Actor is defined as a class and it has a method to receive messages.