This file contains hidden or 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
| # Move to root directory... | |
| cd / | |
| mkdir keys | |
| cd keys | |
| # Generate a self signed certificate for the CA along with a key. | |
| mkdir -p ca/private | |
| chmod 700 ca/private | |
| # NOTE: I'm using -nodes, this means that once anybody gets | |
| # their hands on this particular key, they can become this CA. |
This file contains hidden or 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 | |
| # | |
| # Copyright (c) 2015 W. Mark Kubacki <wmark@hurrikane.de> | |
| # Licensed under the terms of the RPL 1.5 for all usages | |
| # http://www.opensource.org/licenses/rpl1.5 | |
| # | |
| set -e -o pipefail | |
| CAsubj="/C=DE/ST=Niedersachsen/L=Hannover/O=Dummy CA/CN=Sign-It-All" |
This file contains hidden or 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
| package main | |
| import ( | |
| "crypto/tls" | |
| "crypto/x509" | |
| "flag" | |
| "io/ioutil" | |
| "log" | |
| "net/http" | |
| ) |
This file contains hidden or 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 <pthread.h> | |
| #include <semaphore.h> | |
| #include <stdlib.h> | |
| #include <stdio.h> | |
| struct channel_node { | |
| void *val; | |
| struct channel_node *next; | |
| struct channel_node *prev; | |
| }; |
This file contains hidden or 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
| CMSC 421 Operating Systems Lecture Notes | |
| (c) 1994 Howard E. Motteler | |
| Message Passing | |
| ================ | |
| The goal of critical sections, monitors, etc. is to allow | |
| processes to _communicate_ |
This file contains hidden or 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
| /** | |
| * \file coroutine.h | |
| * \brief Coroutines in C. | |
| * \author Vitaly Kravtsov (in4lio@gmail.com) | |
| * \copyright The MIT License | |
| * | |
| * Coroutine mechanics, implemented using the C language extension "Labels as Values". | |
| * Based on Simon Tatham "Coroutines in C". | |
| */ |
This file contains hidden or 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 <stdio.h> | |
| #include <stdint.h> | |
| #include <stdlib.h> | |
| #include <ucontext.h> | |
| typedef struct coro_t_ coro_t; | |
| typedef struct thread_t_ thread_t; | |
| typedef int (*coro_function_t)(coro_t *coro); | |
| typedef enum { | |
| CORO_NEW, |
This file contains hidden or 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
| 0 = Success | |
| 1 = Operation not permitted | |
| 2 = No such file or directory | |
| 3 = No such process | |
| 4 = Interrupted system call | |
| 5 = Input/output error | |
| 6 = No such device or address | |
| 7 = Argument list too long | |
| 8 = Exec format error |
This file contains hidden or 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
| package main | |
| import ( | |
| "fmt" | |
| "github.com/pkg/errors" | |
| ) | |
| func A() error { | |
| // New errors created with pkg/errors.New() will include a full |