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 <chrono> | |
int main(int argc, char const* argv[]) { | |
const auto before = std::chrono::system_clock::now(); | |
for (long long int i = 0; i < 100000000; i++) { | |
i + 1; | |
} |
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
source 'https://rubygems.org' | |
gem 'slack-ruby-client' | |
gem 'eventmachine' | |
gem 'faye-websocket' |
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
@echo off | |
call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" amd64 | |
rem Set Version | |
set VIM_VER=v7.4.1627 | |
set LUA_VER=5.3.2 | |
set PERL_VER=522 | |
rem Set variables |
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/bash | |
if [ $# -ne 1 ]; then | |
echo "usage: $0 DEST" | |
exit -1 | |
fi | |
if [ ! -d $1 ]; then | |
echo "error: no such directory $1" | |
exit -1 |
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
all: parser | |
parser: ./rhp.cc | |
clang++ -std=c++14 -Wall -Wextra -pedantic -O2 -march=native $< -o $@ | |
debug: parser_debug | |
parser_debug: ./rhp.cc | |
clang++ -std=c++14 -Wall -Wextra -pedantic -g -O0 $< -o $@ |
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 <cstdint> | |
template <class Address, class Register, Address address> | |
struct reg_t { | |
static inline void write(Register value) { | |
*reinterpret_cast<volatile Address*>(address) = value; | |
} | |
static inline Register read() { | |
return *reinterpret_cast<volatile Address*>(address); |
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 <unordered_map> | |
extern "C" { | |
#include <arpa/inet.h> | |
#include <sys/socket.h> | |
#include <ifaddrs.h> | |
} | |
std::unordered_map<std::string, std::string> get_if_list() { |
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
QT += core gui webkitwidgets | |
TEMPLATE = app | |
TARGET = QWebView_example | |
INCLUDEPATH += . | |
SOURCES += main.cc | |
CONFIG += c++11 |
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
QT += core gui webkitwidgets | |
TEMPLATE = app | |
TARGET = QWebView_html-to-cpp | |
INCLUDEPATH += . | |
HEADERS += mainwindow.h jsobj.h | |
SOURCES += main.cc mainwindow.cc jsobj.cc | |
CONFIG += c++11 |
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
QT += core gui webkitwidgets | |
TEMPLATE = app | |
TARGET = QWebView_dom | |
INCLUDEPATH += . | |
HEADERS += mainwindow.h | |
SOURCES += main.cc mainwindow.cc | |
CONFIG += c++11 |