Skip to content

Instantly share code, notes, and snippets.


Dimiter 'malkia' Stanev malkia

View GitHub Profile
jifalops /
Last active Jun 30, 2019
Headless Crostini quick setup script for Flutter, VS Code, Node/npm (via nvm), Firebase tools, and pip for Python3

Headless Crostini quick setup script for Flutter, VS Code, Node/npm (via nvm), Firebase tools, and pip for Python3

Modify lines 20 and 21 with your gist and token for the VS Code settings-sync extension.

The script adds a symbolic link to the ChromeOS Downloads folder at ~/Downloads. For it to work, share your Downloads folder with Linux by right-clicking it in the Files app.


  • The script appends to the PATH environment variable each time it runs (at the end).
  • settings.json for VS Code will be overwritten if it exists! (The default settings are empty and it was easier to do it this way than to use jq.)
binshengliu /
Created May 14, 2019
Install Clang-8 on Debian Stretch
sudo echo -e 'deb llvm-toolchain-stretch-8 main\ndeb-src llvm-toolchain-stretch-8 main\n' >> /etc/apt/sources.list
sudo aptitude install clang-8 clang-tools-8 clang-format-8
sudo aptitude install libc++-8-dev libclang-8-dev libc++abi-8-dev
sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-8 100
sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-8 100
sudo update-alternatives --install /usr/bin/clangd clangd /usr/bin/clangd-8 100
sudo update-alternatives --install /usr/bin/clang-format clang-format /usr/bin/clang-format-8 100
ajinasokan /
Last active Nov 22, 2019
Run Flutter apps in MacOS with IDE support and hot reloading

This setup is only for MacOS. I don't have a windows/linux machine to test.

Clone FDE repo

cd ~
git clone

Switch to flutter master

DavidBuchanan314 / cursed_mandelbrot.c
Last active Jan 12, 2022
Compile-time mandelbrot in pure C. Outputs a PGM image file to stdout. Output can be seen at
View cursed_mandelbrot.c
#include <stdio.h>
#define SQ(x) (x)*(x)
#define M0(x,y) SQ(x)+SQ(y)<4?0:0xe0
#define M1(x,y,x0,y0) (SQ(x)+SQ(y)<4)?M0(SQ(x)-SQ(y)+(x0),2*(x)*(y)+(y0)):0xc0
#define M2(x,y,x0,y0) (SQ(x)+SQ(y)<4)?M1(SQ(x)-SQ(y)+(x0),2*(x)*(y)+(y0),x0,y0):0xa0
#define M3(x,y,x0,y0) (SQ(x)+SQ(y)<4)?M2(SQ(x)-SQ(y)+(x0),2*(x)*(y)+(y0),x0,y0):0x80
#define M4(x,y,x0,y0) (SQ(x)+SQ(y)<4)?M3(SQ(x)-SQ(y)+(x0),2*(x)*(y)+(y0),x0,y0):0x60
#define M5(x,y,x0,y0) (SQ(x)+SQ(y)<4)?M4(SQ(x)-SQ(y)+(x0),2*(x)*(y)+(y0),x0,y0):0x40
bzub /
Last active Jul 24, 2021
Fix Crostini Wayland/X (sommelier) service

If you can't get X11 or Wayland GUI Linux apps to start anymore on Chrome OS, try the following.

In the Terminal app, this will show the status of your systemd user services/units:

systemctl --user

If sommelier@0.service and sommelier-x@0.service show a failed status, the following worked for me:

sudo ln -s /opt/google/cros-containers/bin/sommelier.elf /usr/bin/
mattifestation / SysmonEventGUIDParser.ps1
Last active Jun 19, 2022
Extracts fields from sysmon process and logon GUIDs
View SysmonEventGUIDParser.ps1
# Author: Matthew Graeber (@mattifestation)
$Epoch = Get-Date '01/01/1970'
# Conversion trick taken from
$StrCurrentTimeZone = (Get-WmiObject Win32_timezone).StandardName
$TZ = [TimeZoneInfo]::FindSystemTimeZoneById($StrCurrentTimeZone)
# Parse out all the LogonGUID fields for sysmon ProcessCreate events
Get-WinEvent -FilterHashtable @{ LogName = 'Microsoft-Windows-Sysmon/Operational'; Id = 1 } | ForEach-Object {
jart /
Last active Jan 3, 2022
Turns bazel query --output=build // into isomorphic Makefile
# Copyright 2017 The TensorFlow Authors. All Rights Reserved.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
chinmaygarde /
Last active Mar 25, 2022
Flutter Embedder API Example (GLFW with OpenGL)
#include <assert.h>
#include <chrono>
#include <embedder.h>
#include <glfw3.h>
#include <iostream>
static_assert(FLUTTER_ENGINE_VERSION == 1, "");
static const size_t kInitialWindowWidth = 800;
martinwicke / automobile.ipynb
Last active Jan 9, 2022
Estimator demo using Automobile dataset
View automobile.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.