git clone <repo>
clone the repository specified by ; this is similar to "checkout" in some other version control systems such as Subversion and CVS
Add colors to your ~/.gitconfig file:
| # Hello, and welcome to makefile basics. | |
| # | |
| # You will learn why `make` is so great, and why, despite its "weird" syntax, | |
| # it is actually a highly expressive, efficient, and powerful way to build | |
| # programs. | |
| # | |
| # Once you're done here, go to | |
| # http://www.gnu.org/software/make/manual/make.html | |
| # to learn SOOOO much more. |
| /* | |
| * Copyright (c) 2013 Calvin Rien | |
| * | |
| * Based on the JSON parser by Patrick van Bergen | |
| * http://techblog.procurios.nl/k/618/news/view/14605/14863/How-do-I-write-my-own-parser-for-JSON.html | |
| * | |
| * Simplified it so that it doesn't throw exceptions | |
| * and can be used in Unity iPhone with maximum code stripping. | |
| * | |
| * Permission is hereby granted, free of charge, to any person obtaining |
| [merge] | |
| keepBackup = false | |
| tool = p4merge | |
| [mergetool "p4merge"] | |
| cmd = /Applications/p4merge.app/Contents/Resources/launchp4merge "\"$PWD/$BASE\"" "\"$PWD/$REMOTE\"" "\"$PWD/$LOCAL\"" "\"$PWD/$MERGED\"" | |
| keepTemporaries = false | |
| trustExitCode = false | |
| keepBackup = false | |
| [diff] | |
| tool = p4merge |
| $ brew remove git | |
| $ brew remove curl | |
| $ brew install openssl | |
| $ brew install --with-openssl curl | |
| $ brew install --with-brewed-curl --with-brewed-openssl git |
Setting up p4merge
as diff and merge tool on Windows. Tried for Git version 1.8.4.msysgit.0.
Two alternatives are explained: using the command line, and directly editing the config file.
Being the installation path "C:Program Files\Perforce\p4merge.exe", just run:
$ git config --global diff.tool p4merge
Orthodox C++ (sometimes referred as C+) is minimal subset of C++ that improves C, but avoids all unnecessary things from so called Modern C++. It's exactly opposite of what Modern C++ suppose to be.
| "use strict"; | |
| // ================================================= | |
| // a common question that pops up is | |
| // 'why do my async functions use the final value of my loop variable instead of the one they are called with'? | |
| // its because they refer directly to the loop variable and its last value | |
| // the solutions are various ways to bind the loop variable in a new scope | |
| // | |
| // this gist shows different ways to handle a loop that spawns an async function that depends on the loop index | |
| // ================================================= |
| --- src/Makefile.original2015-02-27 10:53:53.130125907 -0500 | |
| +++ src/Makefile 2015-02-27 10:53:24.674126798 -0500 | |
| @@ -7,7 +7,7 @@ | |
| PLAT= none | |
| CC= gcc -std=gnu99 | |
| -CFLAGS= -O2 -Wall -Wextra -DLUA_COMPAT_5_2 $(SYSCFLAGS) $(MYCFLAGS) | |
| +CFLAGS= -O2 -Wall -Wextra -DLUA_COMPAT_5_2 $(SYSCFLAGS) $(MYCFLAGS) -fPIC | |
| LDFLAGS= $(SYSLDFLAGS) $(MYLDFLAGS) | |
| LIBS= -lm $(SYSLIBS) $(MYLIBS) |
| --- Makefile 2014-10-29 19:14:41.000000000 -0400 | |
| +++ Makefile.patched 2015-02-27 14:19:23.077739861 -0500 | |
| @@ -38,21 +38,21 @@ | |
| # Convenience platforms targets. | |
| PLATS= aix bsd c89 freebsd generic linux macosx mingw posix solaris | |
| +# Lua version and release. | |
| +V= 5.3 | |
| +R= $V.0 | |
| + |