Skip to content

Instantly share code, notes, and snippets.

View 0017031's full-sized avatar
🎯
Focusing

fcccp 0017031

🎯
Focusing
View GitHub Profile
@mmozeiko
mmozeiko / !README.md
Last active May 3, 2024 23:40
Download MSVC compiler/linker & Windows SDK without installing full Visual Studio

This downloads standalone 64-bit MSVC compiler, linker & other tools, also headers/libraries from Windows SDK into portable folder, without installing Visual Studio. Has bare minimum components - no UWP/Store/WindowsRT stuff, just files & tools for 64-bit native desktop app development.

Run python.exe portable-msvc.py and it will download output into msvc folder. By default it will download latest available MSVC & Windows SDK - currently v14.32.17.2 and v10.0.22621.0.

You can list available versions with python.exe portable-msvc.py --show-versions and then pass versions you want with --msvc-version and --sdk-version arguments.

To use cl.exe/link.exe from output folder, first run setup.bat - after that PATH/INCLUDE/LIB env variables will be setup to use all the tools as usual. You can also use clang-cl.exe with these includes & libraries.

To use clang-cl.exe without running setup.bat, pass extra /winsysroot msvc argument (msvc is folder name where output is stored).

@numToStr
numToStr / au.lua
Last active August 20, 2023 05:15
Neovim autocmd in lua
--
-- Move this file to your neovim lua runtime path ie. ~/.config/nvim/lua/au.lua
--
local cmd = vim.api.nvim_command
local function autocmd(this, event, spec)
local is_table = type(spec) == 'table'
local pattern = is_table and spec[1] or '*'
local action = is_table and spec[2] or spec
if type(action) == 'function' then
@dino-
dino- / haskell-symbols.md
Last active March 20, 2024 05:38
Haskell symbols

Haskell symbols

When starting out with Haskell, I found it difficult to read a lot of the symbols. I made this document explaining the names of some symbols and how I read them.

:: "has type"

x :: Int

@spdegabrielle
spdegabrielle / keyboard shortcuts.md
Created August 15, 2020 16:58
DrRacket Keyboard shortcuts

C-‹key› means press the Control key

M-‹key› (MacOS: [Esc] followed by but can also be set to [⌘]command or ALT ([⌥]option))

But these are not in the 'Show Keybindings' dialog;

The modifier identifiers are:

s: — All platforms: Shift

@dcts
dcts / workbench.colorCustomizations.json
Created April 14, 2020 16:51 — forked from jacklorusso/workbench.colorCustomizations.json
A list of all Visual Studio Code customizable colors, grouped by UI region. Copy and paste into User Settings (comments are allowed) to tweak an existing theme or work on your own.
"workbench.colorCustomizations": {
// Contrast Colors - The contrast colors are typically only set for high contrast themes. If set, they add an additional border around items across the UI to increase the contrast.
"contrastActiveBorder": "",
"contrastBorder": "",
// Base Colors
"focusBorder": "",
"foreground": "",
"widget.shadow": "",
"selection.background": "",
"descriptionForeground": "",
@Midoliy
Midoliy / Main.fsx
Last active March 6, 2024 09:09
代替データストリームのサンプル
#load "NativeMethod.fsx"
open System
open System.IO
open System.Text
open NativeMethod
let nullptr = IntPtr.Zero
let write (str:string) handle =

Getting Started with Clojure on Windows

Clojure is an amazingly powerful language. Using it (and watching Rich Hickey videos) has changed the way I think about programming, and the way I code in general. Once I learned the basics of the language, which was a relatively quick process, I fell in love and couldn't look back. I hope this post can help others who are new to Clojure get up and running quickly and painlessly.

This post is opinionated in the sense that I'll suggest certain tools to help those who are new to this scene get on their feet. The things you'll need are:

  • Leiningen (pronounced LINE-ing-en) - This is like a package manager, build tool, task manager, and more in one tool. Think npm or nuget, but with more capabilities. There is at least one other build tool for Clojure (boot), but Leiningen is the most widely used.
  • JDK - Clojure runs on Java. Throw out any qualms you may have about Java, we aren't coding in Java (though we can through Clojure, and sometimes tha
@yarel79
yarel79 / X11Forwarding-putty-xming.md
Last active August 2, 2022 14:11
Windows Putty X11 forwarding to Xming

How to forward Linux X11 to Windows hosted X11 server

1. Linux sshd setup

1.1 Modify /etc/ssh/sshd_config and set:

X11Forwarding yes
@mbinna
mbinna / effective_modern_cmake.md
Last active May 3, 2024 15:44
Effective Modern CMake

Effective Modern CMake

Getting Started

For a brief user-level introduction to CMake, watch C++ Weekly, Episode 78, Intro to CMake by Jason Turner. LLVM’s CMake Primer provides a good high-level introduction to the CMake syntax. Go read it now.

After that, watch Mathieu Ropert’s CppCon 2017 talk Using Modern CMake Patterns to Enforce a Good Modular Design (slides). It provides a thorough explanation of what modern CMake is and why it is so much better than “old school” CMake. The modular design ideas in this talk are based on the book [Large-Scale C++ Software Design](https://www.amazon.de/Large-Scale-Soft

@lacygoill
lacygoill / CmdlineEnter_CmdlineLeave.md
Last active December 21, 2021 23:57
New events when you enter/leave a command line in Vim

In patch 8.0.1206, Vim has added 2 new events: CmdlineEnter and CmdlineLeave. They are fired every time you enter or leave a command line.

Syntax

There are 7 types of command lines, including one for normal Ex commands, debug mode commands, search commands (with a distinction between forward and backward), expressions, and inputs (more info at :h cmdwin-char). Each of them is associated with a symbol among this set : > / ? = @ -.

You can limit the effect of an autocmd listening to CmdlineEnter / CmdlineLeave to one or several types of command lines by: