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
| group 'com.github.yourusername' | |
| version '1.0-SNAPSHOT' | |
| //These are dependencies that have to do with just the build. See: https://stackoverflow.com/a/23627293/5432315 | |
| buildscript { | |
| repositories { | |
| jcenter() | |
| } | |
| dependencies { | |
| //This is necessary to use the gradle shadow plugin |
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
| :: | |
| :: Aliases for windows command line | |
| :: | |
| :: Installation: | |
| :: | |
| :: - create a folder for your aliases (eg: ```c:\cmd-aliases```) | |
| :: - add that folder to your PATH variable | |
| :: - save this script as setalias.cmd on that folder | |
| :: - run "alias" to see usage | |
| :: |
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
| FROM golang:1.9 | |
| WORKDIR /go/src/github.com/purplebooth/example | |
| COPY . . | |
| RUN go build -ldflags "-linkmode external -extldflags -static" -a main.go | |
| FROM scratch | |
| COPY --from=0 /go/src/github.com/purplebooth/example/main /main | |
| CMD ["/main"] |
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
| OBJECTS = func.o main.o | |
| CC = gcc | |
| CFLAGS = -std=c11 -m64 -Wall -Wextra -Werror -c | |
| AS = nasm | |
| ASFLAGS = -f elf64 | |
| all: $(OBJECTS) | |
| gcc -m64 $(OBJECTS) -o main | |
| run: all |
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
| dir /B /S > "dir.txt" |
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
| String.prototype.hashCode = function() { | |
| var hash = 0, i, chr; | |
| if (this.length === 0) return hash; | |
| for (i = 0; i < this.length; i++) { | |
| chr = this.charCodeAt(i); | |
| hash = ((hash << 5) - hash) + chr; | |
| hash |= 0; // Convert to 32bit integer | |
| } | |
| return hash; | |
| }; |
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
| function arrayBufferToBase64(data: ArrayBuffer) { | |
| var binary = ""; | |
| var bytes = new Uint8Array(data); | |
| for (var len = bytes.byteLength, i = 0; i < len; i++) { | |
| binary += String.fromCharCode(bytes[i]); | |
| } | |
| return window.btoa(binary); | |
| } |
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
| /** | |
| * A simple sample of Boost DLL | |
| */ | |
| #include <iostream> | |
| #include "boost/shared_ptr.hpp" | |
| #include "boost/function.hpp" | |
| #include "boost/dll/import.hpp" | |
| #include "1_plugin.hxx" |
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
| syscall.MustLoadDLL("user32.dll").MustFindProc("MessageBeep").Call(0xffffffff) |
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
| functiob mask(str, start) { | |
| return str.split("").map((v, i) => i >= start ? "*" :v).join(""); | |
| } |
NewerOlder