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
# ProtocToCpp TARGET : input.proto ; | |
rule ProtocToCpp { | |
local genDir = _pb ; | |
local input = [ FGristFiles $(2) ] ; | |
local cpp = [ FGristFiles [ FDirName $(input:D) $(genDir) $(input:B).pb.cc ] ] ; | |
local h = [ FGristFiles [ FDirName $(input:D) $(genDir) $(input:B).pb.h ] ] ; | |
local outDir = [ FGetAbsolutePath [ FDirName $(input:D) $(genDir) ] ] ; | |
ProtocRun_ $(cpp) $(h) : $(input) : $(genDir) : $(outDir) ; | |
DEPENDS protoc-to-cpp : $(cpp) $(h) ; |
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
pathenv_add() { | |
if [ ! -d "$1" ]; then | |
return 0 | |
fi | |
DIR=$(unxpath "$1") | |
if [ -z "$PATH" ]; then | |
PATH=$DIR | |
elif [ -d "$DIR" ] && [[ ":$PATH:" != *":$DIR:"* ]] ; then | |
if [ "$2" = "after" ] ; then | |
export PATH=$PATH:$DIR |
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
// | |
// The MSVC 19 optimizer deadlocks when compiling GetTrianglesIndices_MSVC19_Deadlock. | |
// Tested on cl.exe v19.27.29112 & v19.29.30142.1 | |
// | |
// See: https://godbolt.org/z/o8rWsWsbb | |
// | |
//! Get triangles indices. | |
//! \remark The array needs to have room for 36 elements. | |
static void GetTrianglesIndices_MSVC19_NoCrash(int* pIndices, bool bCW) { |
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
#define _TMEMBER(T,NAME) member<decltype(T::NAME)>(#NAME) | |
#define _MEMBER(NAME) member<decltype(NAME)>(#NAME) | |
void RegisterBaseTypes(flecs::world& aWorld) { | |
aWorld.component<sVec2f>() | |
._TMEMBER(sVec2f,x) | |
._TMEMBER(sVec2f,y); | |
aWorld.component<sVec3f>() | |
._TMEMBER(sVec3f,x) | |
._TMEMBER(sVec3f,y) |
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
// ==UserScript== | |
// @name Add AlpineJs to Tailwind UI | |
// @namespace http://tampermonkey.net/ | |
// @version 3.0 | |
// @description Add Alpine JS code to Tailwind Ui copy/paste | |
// @author https://gist.github.com/KevinBatdorf/8bd5f808fff6a59e100dfa08a7431822 | |
// @match https://tailwindui.com/components/* | |
// @grant none | |
// ==/UserScript== |
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
(defvar polyglot-mode-hook nil) | |
(defconst polyglot-mode-syntax-table | |
(let ((table (make-syntax-table))) | |
;; SableCC uses java-style comments. | |
;; Follows the C++ example in the major mode tutorial | |
;; //. /*...*/ | |
(modify-syntax-entry ?/ ". 124b" table) | |
(modify-syntax-entry ?* ". 23" table) | |
(modify-syntax-entry ?\n "> b" table) |
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
# | |
# Sample configuration file for the Samba suite for Debian GNU/Linux. | |
# | |
# | |
# This is the main Samba configuration file. You should read the | |
# smb.conf(5) manual page in order to understand the options listed | |
# here. Samba has a huge number of configurable options most of which | |
# are not shown in this example | |
# | |
# Some options that are often worth tuning have been included as |
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
(autoload 'polyglot-mode "polyglot-mode" nil t) | |
(add-to-list 'auto-mode-alist '("\\.polyglot\\'" . polyglot-mode)) | |
(add-to-list 'auto-mode-alist '("\\.productions\\'" . polyglot-mode)) | |
(add-to-list 'auto-mode-alist '("\\.sablecc\\'" . polyglot-mode)) |
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
div, span { | |
box-sizing: border-box; | |
position: relative; | |
display: flex; | |
flex-direction: column; | |
align-items: stretch; | |
flex-shrink: 0; | |
align-content: flex-start; |
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 React = require('react'); | |
var cloneWithProps = require('react/lib/cloneWithProps'); | |
var Clones = React.createClass({ | |
displayName: 'MagicMoveClones', | |
propTypes: { | |
children: React.PropTypes.node, | |
}, |
NewerOlder