Skip to content

Instantly share code, notes, and snippets.

@abrodkin
abrodkin / speedcrunch-for-windows.md
Created March 8, 2023 15:04
Build Speedcrunch on Windows

Install MSYS2

Install additional packages

make
mingw-w64-ucrt-x86_64-cmake
mingw-w64-ucrt-x86_64-gcc
mingw-w64-ucrt-x86_64-qt5-base
mingw-w64-ucrt-x86_64-qt5-tools
@benevidesh
benevidesh / zn
Last active March 12, 2024 16:10
Zettelkasten Workflow (WIP)
#!/usr/bin/bash
# zn - as zettell
# new export variables EDITOR for your editor and
#+ NOTES for your notes folder.
main () {
note_id=$(date +'%Y%m%d%H%M%S')
$EDITOR $NOTES/"$note_id".md
}
@badsyntax
badsyntax / android-emulator-setup.yml
Created August 4, 2021 12:39
Setup the android emulator on Azure Devops Pipelines
# NOTE: must be run on a MacOS Agent!
steps:
- script: |
# Install AVD files
yes | $ANDROID_HOME/tools/bin/sdkmanager --install 'system-images;android-29;default;x86_64'
yes | $ANDROID_HOME/tools/bin/sdkmanager --licenses
# Create emulator
echo "no" | $ANDROID_HOME/tools/bin/avdmanager create avd -n Pixel_API_29_AOSP -d pixel --package 'system-images;android-29;default;x86_64' --force
@smvd
smvd / Winsock2Server.c
Created July 10, 2021 14:20
Simple HTTP server code
/*
- Read code from files
- Show images
- Show json
- Show video
- Show audio
- Better debugging
*/
#include <stdio.h>
@oleksis
oleksis / Compile Mainline Kernel (5.15.0) from WSL2.md
Last active February 21, 2024 19:48
Steps for compile Mainline Kernel Linux using WSL2

Compile Mainline Kernel for WSL2

Steps for compile Kernel Linux 5.15.0

Actual Kernel

$ uname -a
Linux DESKTOP-ID 4.19.128-microsoft-standard #1 SMP Tue Jun 23 12:58:10 UTC 2020 x86_64 GNU/Linux

Work Dir linux

@fdietze
fdietze / trans-cached.sh
Last active February 6, 2024 02:06
Cache `trans` translation results in sqlite
#!/usr/bin/env bash
set -Eeuo pipefail # https://vaneyckt.io/posts/safer_bash_scripts_with_set_euxo_pipefail/#:~:text=set%20%2Du,is%20often%20highly%20desirable%20behavior.
shopt -s expand_aliases
SOURCE_LANG=$1
TARGET_LANG=$2
TEXT=$3
ENGINE=${4-google}
CACHEFILE="$HOME/.cache/trans_cache.sqlite"
@maavelar5
maavelar5 / dmenu.el
Created November 1, 2020 04:35
emacs + dmenu
(setq dmenu-cfg " | dmenu -i -l 20 -p .")
(defun dmenu-ag ()
(interactive)
(setq my_shell_output (shell-command-to-string (concat "ag . " dmenu-cfg)))
(setq splitted (split-string my_shell_output ":"))
(when (> (length splitted) 1)
(find-file (car splitted))
@GuillaumeDua
GuillaumeDua / 13_valuable_things_I_learned_using_CMake.md
Last active April 7, 2024 09:28
13 valuable things I learned using CMake

13 valuable things I learned using CMake

Author : Dua Guillaume
Date : 04-26-2020

Requirement : A first experience with CMake

Intro

As a modern C++ specialist, my job is to focus on software development, from a performance and quality perspective.

@glycerine
glycerine / go-env-with-msys2.md
Created April 26, 2020 01:07 — forked from voidexp/go-env-with-msys2.md
Go development environment on Windows with MSYS2

Go development environment on Windows with MSYS2

Normally, it is sufficient to grab the Go MSI installer from the website in order to set up the toolchain. However, some packages that provide Go wrappers for C libraries rely on cgo tool, which in turn, needs the GCC toolchain in order to build the glue code. Also, 3rd-party dependencies are usually hosted on services like GitHub, thus Git is also needed. This mini-guide illustrates how to setup a convenient development environment on Windows using MSYS2.

@shakna-israel
shakna-israel / LetsDestroyC.md
Created January 30, 2020 03:50
Let's Destroy C

Let's Destroy C

I have a pet project I work on, every now and then. CNoEvil.

The concept is simple enough.

What if, for a moment, we forgot all the rules we know. That we ignore every good idea, and accept all the terrible ones. That nothing is off limits. Can we turn C into a new language? Can we do what Lisp and Forth let the over-eager programmer do, but in C?