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
#include <iostream> | |
#include <cstdlib> | |
#include <fstream> | |
#include <malloc.h> | |
#include <EGL/egl.h> | |
#define GL_GLEXT_PROTOTYPES | |
#include <GL/gl.h> | |
#include <GL/glext.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
#include <GLFW/glfw3.h> | |
#include <cuda_gl_interop.h> | |
#include <cuda.h> | |
#include <cstdio> | |
int main() | |
{ | |
if (!glfwInit()) return; |
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
#include <mqtt/client.h> | |
#include <mqtt/callback.h> | |
#include <string> | |
struct MqttConnection : public mqtt::callback { | |
bool connect(); | |
bool disconnect(); | |
bool transmit(const mqtt::message_ptr msg); | |
// mqtt::callback functions |
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
# curl -# -L https://gist.githubusercontent.com/landersson/2ad0a7352d597e5ef3032b3bf1eaea22/raw | bash | |
function config { | |
/usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME $@ | |
} | |
REPO_METHOD=${1:-"git"} | |
if [[ $REPO_METHOD == "git" ]]; then | |
REPO_URL="[email protected]:landersson/cfg.git" | |
elif [[ $REPO_METHOD == "http" ]]; then |
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
#!/usr/bin/env python3 | |
import os | |
import subprocess | |
url = "https://raw.githubusercontent.com/altercation/vim-colors-solarized/"\ | |
"master/colors/solarized.vim" | |
outfile = "rgbhex-test-data.txt" | |
megabytes = 256 | |
assert not os.path.isfile(outfile) |
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
#include <QApplication> | |
#include <QThread> | |
#include <memory> | |
#include <iostream> | |
#define USE_UNIQUE_PTR | |
template<typename T, typename ...Args> | |
std::unique_ptr<T> make_unique( Args&& ...args ) | |
{ |