Skip to content

Instantly share code, notes, and snippets.

View masaeedu's full-sized avatar

Asad Saeeduddin masaeedu

  • Montreal, QC, Canada
View GitHub Profile
@masaeedu
masaeedu / commands.ps1
Last active February 8, 2017 19:01
Useful P4 commands
# Equivalent to git reset (without discarding workspace changes)
p4 revert -k //...
# More conservative revert of only current dir
p4 revert -k *
# Fast reconcile using timestamps
p4 reconcile -m
@masaeedu
masaeedu / installbuildutils.sh
Created February 9, 2017 00:19
Common Cygwin build utils
apt-cyg install autoconf automake binutils bison bzip2 cygport diffutils fileutils findutils flex gawk gcc-core git libtool make patch pkg-config python3 sed tar
@masaeedu
masaeedu / stuff.md
Last active February 10, 2017 01:47
Fiddly bits with building libvirt on Windows under Cygwin

Start by downloading a release source tarball from libvirt's site. E.g. I downloaded https://libvirt.org/sources/libvirt-3.0.0.tar.xz

You'll need Cygwin to have a chance in hell of compiling stuff. I usually use Chocolatey to get that set up, i.e. choco install cygwin -y. You're a free man/woman, do what you want.

Once you have cygwin, it is helpful to have a nice little cygwin package manager called apt-cyg. Basically it's just a script you need to have on your PATH or in /usr/bin. The instructions are kind of dumb because they tell you to use lynx to install it, but you need it to install lynx. Just D/L it and stick it in cygwin's /usr/bin folder, then chmod +x it.

The overall philosophy of compiling things on Linux (and hence Cygwin) is (with credits to these excellent little articles on the Ubuntu site):

  1. Unzip your release source tarball
@masaeedu
masaeedu / dependencies
Created February 10, 2017 01:36
cygwin package list by the time I'd built libvirt
Cygwin Package Information
Package Version Status
_autorebase 001004-1 OK
adwaita-icon-theme 3.18.0-1 OK
alternatives 1.3.30c-10 OK
autoconf 13-1 OK
autoconf2.1 2.13-12 OK
autoconf2.5 2.69-3 OK
automake 9-1 OK
automake1.10 1.10.3-2 OK
@masaeedu
masaeedu / gist:cdbcb789cb9443afafeff6a0fe999e31
Created February 10, 2017 21:27
Fedora cross compile for libvirt
https://www.redhat.com/archives/libvir-list/2013-September/msg01022.html
@masaeedu
masaeedu / gist:49f7185ff4358bf85e281811d02304d2
Created February 13, 2017 02:31
Windows build suites for different targets
http://stackoverflow.com/a/4544818
Cygwin: apt-cyg install gcc4-g++ make cygutils diffutils util-linux inetutils openssh mintty
32-bit mingw64: apt-cyg install mingw64-i686-gcc-g++ make cygutils diffutils util-linux inetutils openssh mintty
64-bit mingw64: apt-cyg install mingw64-x86_64-gcc-g++ make cygutils diffutils util-linux inetutils openssh mintty
@masaeedu
masaeedu / buildlibiconv.sh
Created February 13, 2017 03:31
WSL build of libiconv for cross-compilation practice
# Download, extract source tarball
curl -O libiconv.tar.gz http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.13.1.tar.gz
tar -xvf libiconv.tar.gz
cd libiconv-1.13.1
# Autoconf build for mingw
./configure --host=x86_64-w64-mingw32
make
mkdir -p /tmp/libiconv-staging
DESTDIR=/tmp/libiconv-staging make install
@masaeedu
masaeedu / gist:24d34b188984d152e0c3cb02fe77035b
Created February 25, 2017 10:59
Making funky Cygwin/MSYS paths in git work with VS Code
https://github.com/Microsoft/vscode/issues/4651

Keybase proof

I hereby claim:

  • I am masaeedu on github.
  • I am masaeedu (https://keybase.io/masaeedu) on keybase.
  • I have a public key ASByG6Ekr8PoPr_lxLUM01PITmjsz53tptpIZH8HlOOPOwo

To claim this, I am signing this object:

@masaeedu
masaeedu / gitopts.txt
Last active May 25, 2017 21:18
Comprehensive list of git options (scraped from https://linux.die.net/man/1/git-config)
core.fileMode
core.ignoreCygwinFSTricks
core.ignorecase
core.trustctime
core.quotepath
core.autocrlf
core.safecrlf
core.symlinks
core.gitProxy
core.ignoreStat