Skip to content

Instantly share code, notes, and snippets.

@xaqq
xaqq / Untitled Document
Created June 17, 2018 21:07
Gist from yEd-Live
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!--Created by yFiles for HTML 2.1.0.3-RC3-->
<graphml xsi:schemaLocation="http://graphml.graphdrawing.org/xmlns http://www.yworks.com/xml/schema/graphml.html/2.0/ygraphml.xsd " xmlns="http://graphml.graphdrawing.org/xmlns" xmlns:demostyle="http://www.yworks.com/yFilesHTML/demos/FlatDemoStyle/1.0" xmlns:bpmn="http://www.yworks.com/xml/yfiles-for-html/bpmn/2.0" xmlns:demotablestyle="http://www.yworks.com/yFilesHTML/demos/FlatDemoTableStyle/1.0" xmlns:uml="http://www.yworks.com/yFilesHTML/demos/UMLDemoStyle/1.0" xmlns:compat="http://www.yworks.com/xml/yfiles-compat-arrows/1.0" xmlns:VuejsNodeStyle="http://www.yworks.com/demos/yfiles-vuejs-node-style/1.0" xmlns:y="http://www.yworks.com/xml/yfiles-common/3.0" xmlns:x="http://www.yworks.com/xml/yfiles-common/markup/3.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<key id="d0" for="node" attr.type="boolean" attr.name="Expanded" y:attr.uri="http://www.yworks.com/xml/yfiles-common/2.0/folding/Expanded
diff --git a/src/core/auth/WiegandCard.cpp b/src/core/auth/WiegandCard.cpp
index d71f304..e074a10 100644
--- a/src/core/auth/WiegandCard.cpp
+++ b/src/core/auth/WiegandCard.cpp
@@ -81,6 +81,8 @@ uint64_t WiegandCard::to_int() const
{
case 26:
return to_wiegand_26();
+ case 34:
+ return to_wiegand_34();
#include <chrono>
#include <iostream>
std::chrono::milliseconds operator""_ms(unsigned long long v)
{
return std::chrono::milliseconds((long int)v);
}
int main()
{
g++ example.cpp -o example -march=native -Wall -Wextra -Wshadow -pedantic -std=c++11 -pthread -Wl,--no-as-needed -I../include -O3 -flto
In file included from example.cpp:29:0:
../include/spdlog/details/spdlog_impl.h: In instantiation of ‘std::shared_ptr<spdlog::logger> spdlog::create(const string&, const Args& ...) [with Sink = spdlog::sinks::rotating_file_sink<std::mutex>; Args = {std::basic_string<char, std::char_traits<char>, std::allocator<char> >, char [4], long unsigned int, long unsigned int, long unsigned int}; std::string = std::basic_string<char>]’:
../include/spdlog/details/spdlog_impl.h:43:127: required from here
../include/spdlog/spdlog.h:84:87: warning: unused parameter ‘args#0’ [-Wunused-parameter]
std::shared_ptr<spdlog::logger> create(const std::string& logger_name, const Args&... args);
^
../include/spdlog/spdlog.h:84:87: warning: unused parameter ‘args#1’ [-Wunused-parameter]
../include/spdlog/spdlo
@xaqq
xaqq / test.c
Created July 5, 2013 15:49
fork and printf, C
#include <stdio.h>
#include <unistd.h>
int main(int ac, char **av)
{
printf("Hello World!");
fork();
return (0);
}
@xaqq
xaqq / myResource.py
Created July 5, 2013 15:43
Python twisted blog
from twisted.Resource import Resource
class myResource(Resource):
def my_render_OPTIONS(self, request):
request.setHeader("Allow-Access-Control-Origin", "mydomain.com"
request.setHeader("Allow-Access-Control-Methods", "DELETE")