A short demo showing the explicit instantiation of templates, and how to avoid parsing the full definition(s) in every compilation unit. The limitation is that it will only be possible to use the specific specialisations explicitly instantiated in the cpp file.
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
Linux rock64 4.4.167-1213-rockchip-ayufan-g34ae07687fce #1 SMP Tue Jun 18 20:44:49 UTC 2019 aarch64 aarch64 aarch64 GNU/Linux | |
rock64@rock64:~$openssl speed -aead -evp aes-128-gcm | |
rock64@rock64:~$openssl speed -aead -evp aes-256-gcm | |
rock64@rock64:~$openssl speed -aead -evp chacha20-poly1305 | |
type 2 bytes 31 bytes 136 bytes 1024 bytes 8192 bytes 16384 bytes | |
---- ------- -------- --------- ---------- ---------- ----------- | |
aes-128-gcm 2326.81k 29137.11k 108788.53k 360005.63k 482115.58k 492399.27k | |
aes-256-gcm 2256.78k 28163.19k 102470.97k 320374.44k 420995.35k 423843.16k | |
chacha20-poly1305 807.76k 11608.37k 32482.65k 129967.34k 167075.84k 169951.23k |
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
#import "ViewController.h" | |
#import <Network/Network.h> | |
@interface ViewController () | |
@property (strong,nonatomic) nw_path_monitor_t pathMonitor; | |
@end | |
@implementation ViewController | |
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
/* | |
This file had now been added to the git repo | |
https://github.com/darrenjs/openssl_examples | |
... which also includes a non blocking client example. | |
------------------------------------------------------------------------------- | |
ssl_server_nonblock.c -- Copyright 2017 Darren Smith -- MIT license |
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
//compile this file with gcc 6.2 or greater | |
#include <iostream> | |
#include <string> | |
#include <locale> | |
#include <vector> | |
#include <cassert> | |
#include <list> | |
using namespace std::literals; |
These are instructions for setting up git to authenticate with GitHub when you have 2-factor authentication set up. This authentication should be inherited by any GUI client you are using. These are intentionally brief instructions, with links to more detail in the appropriate places.
-
Download and install the git command-line client (if required).
-
Open the git bash window and introduce yourself to git (if required):
git config --global user.name 'Firstname Lastname' git config --global user.email 'firstname.lastname@gov.bc.ca'
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
To run a command as administrator (user "root"), use "sudo <command>". | |
See "man sudo_root" for details. | |
bladerf@bladerf:~/Downloads/vmware-tools/vmware-tools-distrib$ sudo perl | |
bin/ FILES vgauth/ | |
caf/ INSTALL vmware-install.pl | |
doc/ installer/ vmware-install.real.pl | |
etc/ lib/ | |
bladerf@bladerf:~/Downloads/vmware-tools/vmware-tools-distrib$ sudo perl vmware-install.pl | |
[sudo] password for bladerf: |
# for CentOS 6.6
( cd /etc/init.d; export $(grep ^proxy= /etc/yum.conf)>/dev/null; curl -LO ${proxy:+-x $proxy} https://gist.github.com/kou1okada/c22e32283c472490e214/raw/zram && chmod +x zram )
chkconfig --add zram
chkconfig zram on
/etc/init.d/zram
loads below configuration files.
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
Decoding the data in /proc/net/tcp: | |
Linux 5.x /proc/net/tcp | |
Linux 6.x /proc/PID/net/tcp | |
Given a socket: | |
$ ls -l /proc/24784/fd/11 | |
lrwx------ 1 jkstill dba 64 Dec 4 16:22 /proc/24784/fd/11 -> socket:[15907701] |
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 | |
# /etc/init.d/xvfb_daemon | |
# Xvfb startup script. | |
# Tom Meier <tom@venombytes.com> | |
# | |
### BEGIN INIT INFO | |
# Provides: xvfb | |
# Short-Description: Start/stop/restart daemon | |
# Description: Controls the Xvfb daemon which starts/stops the X Virtual Framebuffer server | |
# Example Use: |
NewerOlder