Skip to content

Instantly share code, notes, and snippets.

View MagnusTiberius's full-sized avatar
💭
Writing code

Ben Gonzales MagnusTiberius

💭
Writing code
View GitHub Profile
#!/bin/sh
#setup.sh
#Detect docker service, then exit if dockerd is not running.
servicedocker="[/]dockerd"
if ps aux | grep "$servicedocker"; then
echo "Docker is running"
else
echo "Docker is not running"
echo "Please install Docker: sudo apt install docker.io\n\n"
#!/bin/sh
#setup.sh
#Detect docker service, then exit if dockerd is not running.
servicedocker="[/]dockerd"
if ps aux | grep "$servicedocker"; then
echo "Docker is running"
else
echo "Docker is not running"
echo "Please install Docker: sudo apt install docker.io\n\n"
version: "2"
services:
blobstorage:
container_name: blobstorage
image: blobstorage
build:
context: ./BlobStorage/build/docker
dockerfile: Dockerfile
ports:
@MagnusTiberius
MagnusTiberius / golang-tls.md
Created September 24, 2017 23:24 — forked from subfuzion/golang-tls.md
Simple Golang HTTPS/TLS Examples
Generate private key (.key)
# Key considerations for algorithm "RSA" ≥ 2048-bit
openssl genrsa -out server.key 2048
    
# Key considerations for algorithm "ECDSA" ≥ secp384r1
# List ECDSA the supported curves (openssl ecparam -list_curves)
openssl ecparam -genkey -name secp384r1 -out server.key
@MagnusTiberius
MagnusTiberius / client.go
Created September 24, 2017 23:17 — forked from spikebike/client.go
TLS server and client
package main
import (
"crypto/tls"
"crypto/x509"
"fmt"
"io"
"log"
)
sudo groupadd docker
sudo usermod -aG docker $USER
#install docker
sudo wget https://download.docker.com/linux/static/stable/x86_64/docker-17.03.0-ce.tgz
#>/dev/null 2>&1
sudo tar -xzvf docker-17.03.0-ce.tgz
sudo cp docker/* /usr/bin/
#fix: ref-> https://stackoverflow.com/questions/24396071/docker-error-mountpoint-not-found
sudo apt-get -y install cgroup-bin
A
|
B
| |
C D
| | |
E F H
|
G
|
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netdb.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/epoll.h>
#include <errno.h>
ALTER PROCEDURE [dbo].[EIP_EPOEvents_InsertEvent]
(
@ServerID nvarchar(16) = NULL,
@DetectedUTC datetime,
@AgentGUID nvarchar(64),
@Analyzer nvarchar(16),
@AnalyzerName nvarchar(64),
@AnalyzerVersion nvarchar(20),
@AnalyzerHostName nvarchar(128) = NULL,
@AnalyzerIPV4 int = NULL,
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <fcntl.h>
#include <unistd.h>
#include <getopt.h>
#include <sys/queue.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/file.h>