This file contains hidden or 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
| #include <cstdio> | |
| #include <tuple> | |
| #include <utility> | |
| #include <type_traits> | |
| template<int ...I> struct index_tuple_type { | |
| template<int N> using append = index_tuple_type<I..., N>; | |
| }; | |
| template<int N> struct make_index_impl { | |
| using type = typename make_index_impl<N-1>::type::template append<N-1>; |
This file contains hidden or 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
| --[[ | |
| LUA MODULE | |
| pythonic.optparse - Lua-based partial reimplementation of Python's | |
| optparse [2-3] command-line parsing module. | |
| SYNOPSIS | |
| local OptionParser = require "pythonic.optparse" . OptionParser |
This file contains hidden or 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
| [nsf @ rustenumgen]$ cat test.txt | |
| enum SDL_EventType { | |
| SDL_FIRSTEVENT = 0, | |
| SDL_QUIT = 0x100, | |
| SDL_APP_TERMINATING, | |
| SDL_APP_LOWMEMORY, | |
| SDL_APP_WILLENTERBACKGROUND, | |
| SDL_APP_DIDENTERBACKGROUND, | |
| SDL_APP_WILLENTERFOREGROUND, | |
| SDL_APP_DIDENTERFOREGROUND, |
This file contains hidden or 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
| package main | |
| import ( | |
| "container/list" | |
| ) | |
| type Updater interface { | |
| Update() | |
| } |
This file contains hidden or 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
| Process the file below with `go tool cgo -godefs <file>`, dump the output. And tell me your `go tool dist env | grep "GOOS\|GOARCH"` |
This file contains hidden or 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
| Basically you can do that by simple running an external command from | |
| your editor. | |
| Autocompletion command needs the following information from your editor: | |
| 1. Current file buffer (possible unsaved). | |
| 2. Cursor position (offset in bytes from the beginning of the buffer). | |
| 3. The full file name of the currently edited buffer. It can be | |
| relative to the current/working directory. |
This file contains hidden or 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
| package main | |
| import "io" | |
| import "bufio" | |
| import "bytes" | |
| import "os" | |
| type CommentSkipper struct { | |
| r *bufio.Reader | |
| } |
This file contains hidden or 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
| include $(GOROOT)/src/Make.inc | |
| PREREQ += command.a | |
| TARG = test | |
| GOFILES= test.go | |
| include $(GOROOT)/src/Make.cmd | |
| command.a: command/command.go command/Makefile | |
| gomake -C command |
This file contains hidden or 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
| #!/bin/bash | |
| rm -rf *.o *.[568] test_* |
This file contains hidden or 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
| #version 330 core | |
| in vec3 frag; | |
| out vec4 col; | |
| void main() | |
| { | |
| col = vec4(frag, 1.0); | |
| } |