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
((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
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 | |
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:-''} |
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 <iomanip> | |
#include <sstream> | |
#include <chrono> | |
#include <ctime> | |
std::string get_timestamp() noexcept | |
{ | |
const auto now = std::chrono::system_clock::now(); | |
const auto time = std::chrono::system_clock::to_time_t(now); |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8" /> | |
<title>fp_Ben-Doherty</title> | |
</head> | |
<body> | |
<style type="text/css"> | |
@page{size: 319.83594508009156mm 235.36mm;} | |
body { |
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
syntax = "proto3"; | |
package service.logging; | |
import "google/protobuf/timestamp.proto"; | |
message Log { | |
message Context { | |
google.protobuf.Timestamp timestamp = 1; | |
string host_or_ip = 2; |
NewerOlder