Git for Windows comes bundled with the "Git Bash" terminal which is incredibly handy for unix-like commands on a windows machine. It is missing a few standard linux utilities, but it is easy to add ones that have a windows binary available.
The basic idea is that C:\Program Files\Git\mingw64\
is your /
directory according to Git Bash (note: depending on how you installed it, the directory might be different. from the start menu, right click on the Git Bash icon and open file location. It might be something like C:\Users\name\AppData\Local\Programs\Git
, the mingw64
in this directory is your root. Find it by using pwd -W
).
If you go to that directory, you will find the typical linux root folder structure (bin
, etc
, lib
and so on).
If you are missing a utility, such as wget, track down a binary for windows and copy the files to the corresponding directories. Sometimes the windows binary have funny prefixes, so
/*The MIT License (MIT) | |
Copyright (c) 2016 Edward Rowe (@edwardlrowe) | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is | |
furnished to do so, subject to the following conditions: | |
The above copyright notice and this permission notice shall be included in all | |
copies or substantial portions of the Software. |
import requests | |
from json import dumps, loads | |
from msgpack import packb, unpackb | |
data = {'say': 'hello, world!'} | |
headers_msgpack = {'Content-Type': 'application/msgpack'} | |
headers_json = {'Content-Type': 'application/json'} | |
r = requests.post('http://localhost:8000/', data=packb(data), headers=headers_msgpack) | |
print(unpackb(r.content)) |
# Precondition: Git for Windows 2.9.0 + Windows 7, other version of Git for Windows & Windows XP and Windows 10 should also be supported | |
# In /etc/ssh/sshd_config, set UsePrivilegeSeparation to no | |
# You can also change other settings of SSHD like port in this file | |
# Generate key pairs | |
ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key -q -N "" | |
ssh-keygen -t dsa -f /etc/ssh/ssh_host_dsa_key -q -N "" | |
ssh-keygen -t ecdsa -f /etc/ssh/ssh_host_ecdsa_key -q -N "" | |
ssh-keygen -t ed25519 -f /etc/ssh/ssh_host_ed25519_key -q -N "" |
I want Microsoft to do better, want Windows to be a decent development platform-and yet, I constantly see Microsoft playing the open source game: advertising how open-source and developer friendly they are - only to crush developers under the heel of the corporate behemoth's boot.
The people who work at Microsoft are amazing, kind, talented individuals. This is aimed at the company's leadership, who I feel has on many occassions crushed myself and other developers under. It's a plea for help.
You probably haven't heard of it before, but if you've ever used win32 API bindings in C#, C++, Rust, or other languages, odds are they were generated from a repository called microsoft/win32metadata.