Skip to content

Instantly share code, notes, and snippets.

View victorstewart's full-sized avatar
☠️

Victor Stewart victorstewart

☠️
  • NYC
View GitHub Profile
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
#import "ViewController.h"
#import <Network/Network.h>
@interface ViewController ()
@property (strong,nonatomic) nw_path_monitor_t pathMonitor;
@end
@implementation ViewController
@darrenjs
darrenjs / ssl_server_nonblock.c
Last active March 22, 2024 08:34
OpenSSL example using memory BIO with non-blocking socket IO
/*
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
@jdtournier
jdtournier / README.md
Last active February 11, 2023 07:26
short demo of explicit instantiation of templates, and avoiding parsing the full definition in every compilation unit

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.

@jeb2239
jeb2239 / main.cpp
Created February 28, 2017 22:09
Example C++ concepts with gcc 6.2 or greater
//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;
@ateucher
ateucher / setup-gh-cli-auth-2fa.md
Last active June 28, 2022 07:16
Setup git on the CLI to use 2FA with GitHub

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.

  1. Download and install the git command-line client (if required).

  2. 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'
    
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:
@kou1okada
kou1okada / README.md
Last active April 4, 2017 17:44
An initscript for zram.

An initscript for zram

Installation

# 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

Configuration

/etc/init.d/zram loads below configuration files.

@jkstill
jkstill / proc_net_tcp_decode
Last active April 17, 2024 07:03
decode entries in /proc/net/tcp
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]
@tommeier
tommeier / xvfb_daemon.sh
Created April 27, 2011 10:44
Xvfb startup init script for headless selenium with multiple displays for Jenkins or Teamcity CI server
#!/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: