Skip to content

Instantly share code, notes, and snippets.

Avatar

Dimiter 'malkia' Stanev malkia

View GitHub Profile
@malkia
malkia / buiild.cue
Last active Feb 10, 2022
cue example of references using integer indexes, then transforming them into bits
View buiild.cue
import (
"list"
)
build: {
proj1: {
deps: [
"proj2",
]
}
@malkia
malkia / gist:015754b862d948e451a91702ecb39241
Created Apr 10, 2021
CMake from Visual Studio 2019 (16.9)
View gist:015754b862d948e451a91702ecb39241
1> CMake generation started for default configuration: 'x64-Debug'.
1> Command line: "cmd.exe" /c "%SYSTEMROOT%\System32\chcp.com 65001 >NUL && "c:\program files (x86)\microsoft visual studio\2019\professional\common7\ide\commonextensions\microsoft\cmake\CMake\bin\cmake.exe" -G "Ninja" -DCMAKE_BUILD_TYPE:STRING="Debug" -DCMAKE_INSTALL_PREFIX:PATH="D:\p\imgui-fetchcontent\out\install\x64-Debug" -DCMAKE_C_COMPILER:FILEPATH="C:/Program Files (x86)/Microsoft Visual Studio/2019/Professional/VC/Tools/MSVC/14.28.29910/bin/Hostx64/x64/cl.exe" -DCMAKE_CXX_COMPILER:FILEPATH="C:/Program Files (x86)/Microsoft Visual Studio/2019/Professional/VC/Tools/MSVC/14.28.29910/bin/Hostx64/x64/cl.exe" -DCMAKE_MAKE_PROGRAM="c:\program files (x86)\microsoft visual studio\2019\professional\common7\ide\commonextensions\microsoft\cmake\Ninja\ninja.exe" "D:\p\imgui-fetchcontent" 2>&1"
1> Working directory: D:\p\imgui-fetchcontent\out\build\x64-Debug
1> [CMake] -- The C compiler identification is MSVC 19.28.29913.0
1> [CMake] -- The CXX
View gist:2e9ee45a115cfe223499705dca4f681e
Selecting Windows SDK version 10.0.20277.0 to target Windows 10.0.19042.
Microsoft (R) Build Engine version 16.9.0+5e4b48a27 for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.
Checking Build System
Performing download step (git clone) for 'glfw-populate'
Cloning into 'glfw-src'...
BUG: run-command.c:520: disabling cancellation: Invalid argument
fatal: destination path 'glfw-src' already exists and is not an empty directory.
fatal: destination path 'glfw-src' already exists and is not an empty directory.
View CLion installing grcov for Rust
<omitted>/.cargo/bin/cargo.exe install --color=always --force grcov
Updating crates.io index
Downloading crates ...
Downloaded grcov v0.7.1
Installing grcov v0.7.1
Downloading crates ...
Downloaded cargo-binutils v0.3.3
Downloaded cargo_metadata v0.11.4
Downloaded fomat-macros v0.3.1
Downloaded slug v0.1.4
View game_of_life.dart
import 'dart:math';
import 'dart:typed_data';
import 'package:flutter/material.dart';
import 'package:flutter/src/scheduler/ticker.dart';
import 'package:flutter/widgets.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
@malkia
malkia / tictactoe.dart
Created Nov 21, 2020
Super Tic Tac Toe in Flutter
View tictactoe.dart
import 'package:flutter/material.dart';
// https://github.com/malkia/tictactoc
// https://malkia.github.io/tictactoe
// https://codepen.io/malkia76/pen/YzWojXy
void main() {
runApp(myApp());
}
View blah..dart
import 'dart:math';
import 'dart:io';
var random = Random();
List<int> makeRandom(int n) {
var x = List<int>(n);
for (int i = 0; i < n; i++) {
x[i] = random.nextInt(n * 10);
}
@malkia
malkia / md5sum.dart
Created Apr 28, 2020
md5sum implementation in dart, doing recursive scan and using isolates (set to be half the number of Logical CPUs)
View md5sum.dart
import 'dart:isolate';
import 'dart:io';
import 'dart:math';
import 'package:crypto/crypto.dart';
class Stop {}
final _stop = Stop();
class Args {
View gammon2.dart
// Try on DartPad.dev
import 'package:flutter/foundation.dart'
show debugDefaultTargetPlatformOverride;
import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';
import 'dart:math';
import 'dart:async';
var random = Random(0);
View gammon1.dart
import 'package:flutter/foundation.dart'
show debugDefaultTargetPlatformOverride;
import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';
import 'dart:math';
var random = Random(0);
class GammonRules {
// The total number of points on the table.