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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- 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 | |
+ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- 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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"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 | |
// ================================================= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var myColor0 = new THREE.Color(0xff0000); | |
var myColor1 = new THREE.Color(0x00ff00) | |
var cube = new THREE.Mesh( | |
new THREE.BoxGeometry(1,1,1), | |
new THREE.ShaderMaterial({ | |
uniforms: { | |
fade: { type: 'f', value: 0 }, | |
myColor0: {value : myColor0}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var g = 400; | |
var h = 10; | |
var m = 1; | |
var totalTime = 0; | |
var engine = m * g * h; | |
var t = Math.sqrt((2 * h)/g); | |
var vt = 0; | |
var v0 = 0; | |
function startYoYo(dt) | |
{ |
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ brew remove git | |
$ brew remove curl | |
$ brew install openssl | |
$ brew install --with-openssl curl | |
$ brew install --with-brewed-curl --with-brewed-openssl git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[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 |