Skip to content

Instantly share code, notes, and snippets.

@komlevv
komlevv / !README.md
Created January 25, 2024 11:53 — forked from CrendKing/!README.md
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).

@komlevv
komlevv / Rust install windows
Last active January 12, 2024 15:07 — forked from vinhjaxt/Rust install windows
Portable rust installation on windows
# url for stable
# https://static.rust-lang.org/dist/rust-1.75.0-x86_64-pc-windows-msvc.tar.gz
# more @ https://forge.rust-lang.org/infra/other-installation-methods.html#standalone
curl.exe https://static.rust-lang.org/dist/rust-nightly-x86_64-pc-windows-msvc.tar.gz
set "PATH=%PATH%;.\rust-nightly\rustc\bin"
set "PATH=%PATH%;.\rust-nightly\cargo\bin"
@komlevv
komlevv / FlushFirewallTaskForTaskScheduler.xml
Last active January 8, 2023 02:07
Set Win Firewall Rules using Group Policy
<?xml version="1.0" encoding="UTF-16" ?>
- <Task version="1.4" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task">
- <RegistrationInfo>
<Date>2023-01-06T06:49:09.0297907</Date>
<Author>------------------------AUTHOR HERE------------------------</Author>
<Description>Flush Local Firewall Rules</Description>
<URI>\FlushFirewall</URI>
</RegistrationInfo>
- <Triggers>
- <EventTrigger>
@komlevv
komlevv / gist:0e2de6b16a826918660ce5ab1b539ada
Last active August 2, 2019 08:05
Aliexpress popup removal
@komlevv
komlevv / git-pushing-multiple.rst
Created June 27, 2019 03:50 — forked from rvl/git-pushing-multiple.rst
How to push to multiple git remotes at once. Useful if you keep mirrors of your repo.

Pushing to Multiple Git Repos

If a project has to have multiple git repos (e.g. Bitbucket and Github) then it's better that they remain in sync.

Usually this would involve pushing each branch to each repo in turn, but actually Git allows pushing to multiple repos in one go.

If in doubt about what git is doing when you run these commands, just

@komlevv
komlevv / Vagrantfile
Created October 25, 2018 11:48 — forked from roblayton/Vagrantfile
A Vagrant multi-machine cluster using a loop
# -*- mode: ruby -*-
# vi: set ft=ruby :
VAGRANTFILE_API_VERSION = "2"
cluster = {
"master" => { :ip => "192.168.33.10", :cpus => 1, :mem => 1024 },
"slave" => { :ip => "192.168.33.11", :cpus => 1, :mem => 1024 }
}
@komlevv
komlevv / playbook_centos_install_docker.yaml
Last active February 11, 2020 04:28 — forked from yonglai/playbook_centos_install_docker.yaml
An Ansible playbook to install docker-ce on Centos
---
- name: Install docker
gather_facts: No
hosts: default
tasks:
- name: Install yum utils
yum:
name: yum-utils
state: latest
https://github.com/hashicorp/vagrant/issues/1324#issuecomment-21451515
Vagrant no longer removes unused network interfaces and leaves it up
to the user. This can forcibly be re-enabled using VirtualBox
provider-specific config:
```
config.vm.provider "virtualbox" do |v|
v.destroy_unused_network_interfaces = true
end
@komlevv
komlevv / global-gitignore.md
Created October 21, 2018 00:48 — forked from subfuzion/global-gitignore.md
Global gitignore

There are certain files created by particular editors, IDEs, operating systems, etc., that do not belong in a repository. But adding system-specific files to the repo's .gitignore is considered a poor practice. This file should only exclude files and directories that are a part of the package that should not be versioned (such as the node_modules directory) as well as files that are generated (and regenerated) as artifacts of a build process.

All other files should be in your own global gitignore file. Create a file called .gitignore in your home directory and add anything you want to ignore. You then need to tell git where your global gitignore file is.

Mac

git config --global core.excludesfile ~/.gitignore

Windows

git config --global core.excludesfile %USERPROFILE%\.gitignore
@komlevv
komlevv / ContextCmder-Disable.reg
Created October 20, 2018 01:12 — forked from jojobyte/ContextCmder-Disable.reg
Cmder Context (Right-Click) Menu for Windows 7/8
Windows Registry Editor Version 5.00
[-HKEY_CLASSES_ROOT\Directory\Background\shell\Cmder]
[-HKEY_CLASSES_ROOT\Directory\shell\Cmder]