Skip to content

Instantly share code, notes, and snippets.

View kika's full-sized avatar

Kirill Pertsev kika

View GitHub Profile
@kika
kika / chowmein.md
Last active March 8, 2025 23:52
Steak Chow Mein with Vegetables

Steak Chow Mein with Vegetables

Ingredients

  • Chow mein noodles (prepare according to package instructions)
  • Leftover grilled steak, thinly sliced against the grain
  • Broccoli, cut into small florets
  • Champignon mushrooms, sliced
  • Bell peppers, sliced
  • Green onions, chopped (reserve some green parts for garnish)
  • 2-3 cloves garlic, minced
@kika
kika / notifier.rs
Created August 16, 2023 15:48
Classificados Online Email Notifier
use select::document::Document;
use select::predicate::Class;
use serde_json::json;
use worker::*;
mod utils;
struct ParseError(String);
impl std::fmt::Display for ParseError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
@kika
kika / main-noasync.dart
Last active August 2, 2022 20:04
resonating-destiny-0416
import 'dart:html';
void main() {
wsAPI()
.then((_) => print('Great success!'))
.catchError((_) => print('Miserable failure'));
}
Future<void> wsAPI() async {
try {
@kika
kika / main.dart
Created August 2, 2022 19:58
resonating-destiny-0416
import 'dart:html';
void main() async {
try {
final socket = await wsConnect('wss://127.0.0.1:7654');
print('${socket.readyState}');
} catch (e) {print(e);}
}
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
double kHeight = 100;
double kWidth = 100;
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
@kika
kika / main.dart
Created July 29, 2019 04:34
Create flutter project with `flutter create` and replace the source file with this
import 'package:flutter/material.dart';
class MyKeys {
static final GlobalKey navKey = GlobalKey<NavigatorState>(debugLabel: 'navKey');
}
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
// This widget is the root of your application.
@kika
kika / antiantialias.sh
Last active February 26, 2025 10:34
Keep VS Code UI font antialiased when the editor window has the antialias turned off
# MacOS only
# This script modifies one VS Code file. After that the VS Code will complain that the installation is damaged.
# You can dismiss the warning or install an extension that recalculates the checksums for the files
# The script creates a backup for the CSS file it modifies
perl -i.bak -pe 's/\.monaco-workbench.mac.monaco-font-aliasing-none{-webkit-font-smoothing:none/.monaco-workbench.mac.monaco-font-aliasing-none{-webkit-font-smoothing:antialiased/g' \
/Applications/Visual\ Studio\ Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.css
@kika
kika / flutter.vim
Created February 4, 2019 02:59
Flutter classes and types for Vim syntax highlighting in Dart. Add this to your `.vimrc`
augroup fl_dart
autocmd!
autocmd Syntax dart highlight default link dartFlutterClasses Type
autocmd Syntax dart highlight default link dartFlutterTypedefs Typedef
autocmd Syntax dart highlight default link dartFlutterExceptions Exception
autocmd Syntax dart highlight default link dartFlutterConstants Constant
autocmd Syntax dart highlight default link dartFlutterEnums Type
autocmd Syntax dart highlight default link dartFlutterMixins Type
autocmd Syntax dart syntax keyword dartFlutterMixins
\ AnimationEagerListenerMixin AnimationLazyListenerMixin
@kika
kika / progress.sh
Last active December 29, 2018 03:44
Calculate daily progress in lines of code from git repo and generate csv file.
#!/bin/bash
DATE=gdate
set -euo pipefail
if [[ "${1:-}" == "" || "${2:-}" == "" ]]; then
echo "Usage: $0 <start date> <directory with source> [optional cloc args]"
exit 1
fi
newtype A = A {
properties :: StrMap B
}
newtype B = B {
first :: String,
last :: String,
ssn :: String
}