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
/* | |
* Blog of the original author: https://davidgorski.ca/posts/truncate-string-whitespace-compiletime-cpp/ | |
* Original source gist: https://gist.github.com/dgski/810ede7c4a80917c0adc99c6852fee9a | |
* | |
* Modifications by @t2ym (https://github.com/t2ym) | |
* - Rearranged as a header file | |
* - Surrounded main() by #ifdef COMPILE_TIME_TRUNCATION_EXAMPLE ... #endif | |
* - Added an argument "" to static_assert() to comply with C++11 | |
* - Put truncateWhitespace() in the compiletime namespace | |
* - Made is_whitespace() inline |
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
/* | |
* Copyright (c) 2021, Tetsuya Mori <t2y3141592@gmail.com> | |
* All rights reserved. | |
* | |
* Redistribution and use in source and binary forms, with or without | |
* modification, are permitted provided that the following conditions are met: | |
* | |
* 1. Redistributions of source code must retain the above copyright notice, | |
* this list of conditions and the following disclaimer. | |
* 2. Redistributions in binary form must reproduce the above copyright notice, |
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
diff --git a/src/asio_server.cc b/src/asio_server.cc | |
index 74c92276..5a79061e 100644 | |
--- a/src/asio_server.cc | |
+++ b/src/asio_server.cc | |
@@ -154,7 +154,7 @@ void server::start_accept(boost::asio::ssl::context &tls_context, | |
return; | |
} | |
- new_connection->start(); | |
+ new_connection->start(new_connection->socket().native_handle()); |
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
/* | |
* nghttp2 - HTTP/2 C Library | |
* | |
* Copyright (c) 2014 Tatsuhiro Tsujikawa | |
* | |
* Permission is hereby granted, free of charge, to any person obtaining | |
* a copy of this software and associated documentation files (the | |
* "Software"), to deal in the Software without restriction, including | |
* without limitation the rights to use, copy, modify, merge, publish, | |
* distribute, sublicense, and/or sell copies of the Software, and to |
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
/* | |
* Copyright (c) 2021, Tetsuya Mori <t2y3141592@gmail.com> | |
* All rights reserved. | |
* | |
* Redistribution and use in source and binary forms, with or without | |
* modification, are permitted provided that the following conditions are met: | |
* | |
* 1. Redistributions of source code must retain the above copyright notice, | |
* this list of conditions and the following disclaimer. | |
* 2. Redistributions in binary form must reproduce the above copyright notice, |
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
{ | |
"title": "Minila-like key mappings with left Cmd", | |
"rules": [ | |
{ | |
"description": "Minila-like key mappings with left Cmd", | |
"manipulators": [ | |
{ | |
"from": { | |
"key_code": "s", | |
"modifiers": { |
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
remove mod4 = Super_L | |
keycode 133 = Mode_switch | |
keycode 24 = q Q q Q | |
keycode 25 = w W w W | |
keycode 26 = e E Up Up | |
keycode 27 = r R r R | |
keycode 28 = t T t T | |
keycode 29 = y Y y Y | |
keycode 30 = u U u U |
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
Windows Registry Editor Version 5.00 | |
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout] | |
"Scancode Map"=hex:00,00,00,00,00,00,00,00,03,00,00,00,5d,e0,5b,e0,5b,e0,38,e0,\ | |
00,00,00,00 |
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
<?xml version="1.0"?> | |
<root> | |
<item> | |
<name>Fn + Minila (with Command_L to Fn)</name> | |
<identifier>option.minilamode_fn</identifier> | |
<autogen>__KeyToKey__ KeyCode::S, ModifierFlag::FN, KeyCode::CURSOR_LEFT</autogen> | |
<autogen>__KeyToKey__ KeyCode::D, ModifierFlag::FN, KeyCode::CURSOR_DOWN</autogen> | |
<autogen>__KeyToKey__ KeyCode::E, ModifierFlag::FN, KeyCode::CURSOR_UP</autogen> | |
<autogen>__KeyToKey__ KeyCode::F, ModifierFlag::FN, KeyCode::CURSOR_RIGHT</autogen> | |
<autogen>__KeyToKey__ KeyCode::M, ModifierFlag::FN, KeyCode::FORWARD_DELETE</autogen> |
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
#!/bin/sh | |
if [ "$1" = "" ]; then | |
echo Please specify the path to the root folder containing the target XLIFF file | |
echo $0 /Path/To/XLIFF/Folder | |
exit 1 | |
fi | |
which openssl | |
if [ "$?" = "1" ]; then | |
echo Please install openssl command |
NewerOlder