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
git clone https://github.com/Microsoft/vcpkg.git | |
cd vcpkg | |
./bootstrap-vcpkg.sh | |
./vcpkg search sqlite3 | |
./vcpkg install sqlite3[tool] | |
# headers, static library, and command-line tool | |
$ tree installed/x64-linux/{include,lib,tools} |
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/bash | |
set -e | |
ORG="" | |
REPOS="$(gh repo list "$ORG" --json name --jq '.[] | join("")')" | |
NODEJS12_DEPRECATION_MSG="Node.js 12 actions are deprecated." | |
for REPO in $REPOS; do | |
echo -n "$ORG/$REPO " |
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
// ---------------------------------------------- | |
// Open Notepad on Windows using QProcess | |
// Asynchronously using std::async and | |
// Wait for it to exit with std::future | |
// ---------------------------------------------- | |
#include <QProcess> // QProcess | |
#include <QDebug> // qDebug(), qCritical(), ... | |
#include <future> |
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 <fstream> | |
#include <cstdlib> | |
#include <rapidjson/document.h> | |
#include <rapidjson/istreamwrapper.h> | |
#include <rapidjson/writer.h> | |
#include <rapidjson/stringbuffer.h> | |
#include <rapidjson/ostreamwrapper.h> | |
int main() |
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
((Get-NetTCPConnection -State Listen | Select-Object -Property LocalPort | ConvertTo-csv -NoTypeInformation | Select-Object -skip 1) -join ",") -replace '"' | |
# List IPv4 listening local ports | |
(Get-NetTCPConnection -State Listen | Where-Object -Property LocalAddress -NotContains '::' | Select-Object -Property LocalPort | ConvertTo-csv -NoTypeInformation | Select-Object -skip 1 -Unique) -replace '"' |
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/bash | |
# uninstall existing cppcheck | |
sudo apt purge cppcheck -y | |
# download, build and install | |
cd ~/Downloads | |
wget https://github.com/danmar/cppcheck/archive/refs/tags/2.11.tar.gz | |
tar -xvf 2.11.tar.gz | |
cd cppcheck-2.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
require 'zstd' | |
module Fluent::Plugin | |
class S3Output | |
class LZMA2Compressor < Compressor | |
S3Output.register_compressor('zstd', self) | |
def initialize(options = {}) | |
begin | |
require 'zstd' |
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/bash | |
set -e | |
owner="" # owner name here | |
repo="" # repo name here | |
prs=$(gh pr list --repo "$owner/$repo" --json number --jq '.[] | join("")') | |
for pr in $prs; do |
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
// ---------------------------------------------- | |
// List the contents of a directory if changed | |
// Using QFileSystemWatcher, QDirIterator and | |
// QEventLoop, and lambda function for connect | |
// ---------------------------------------------- | |
#include <QObject> | |
#include <QEventLoop> | |
#include <QDebug> | |
#include <QFileSystemWatcher> |
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/bash | |
set -e | |
if [[ -z $GITHUB_ACTOR || -z $GITHUB_TOKEN || -z $GITHUB_REPOSITORY ]]; then | |
echo "[ERR] Run $0 under GitHub Actions context!" | |
exit 1 | |
fi | |
IMAGE_NAME=${1:-''} |
NewerOlder