# create a private key for the CA
openssl genrsa -out ca.key 4096
# create a CA using the private key
openssl req -x509 -new -nodes -key ca.key -days 3650 -out ca.crt
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
package structmap | |
import ( | |
"fmt" | |
"reflect" | |
"strings" | |
) | |
type Options struct { | |
Strict bool |
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> | |
<head> | |
<title>Custom Icon</title> | |
<link rel="stylesheet" href="https://openlayers.org/en/v4.2.0/css/ol.css" type="text/css"> | |
<!-- The line below is only needed for old environments like Internet Explorer and Android 4.x --> | |
<script src="https://cdn.polyfill.io/v2/polyfill.min.js?features=requestAnimationFrame,Element.prototype.classList,URL"></script> | |
<script src="https://openlayers.org/en/v4.2.0/build/ol.js"></script> | |
</head> | |
<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
const DefaultAlphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890!@#$%^&*()_-+=[]{};:?/.>,<|".split(""); | |
class IDGenerator { | |
permutation = new Array<number>(); | |
constructor( | |
private size = 10, | |
private alphabet = DefaultAlphabet |
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
/** | |
* Uni-directional proxy that automatically recovers | |
* lost connections transparently to the client. | |
*/ | |
package main | |
import ( | |
"flag" | |
"io" |
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
gz () { | |
local _ROOT=/home/icholy/Code/src | |
local _REPO=$(find "$_ROOT" -maxdepth 4 -type d -name ".git" | path -d | fzf -e) | |
cd "$_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
#!/usr/bin/env python | |
def make_masks(n): | |
mask = [0] * n | |
while True: | |
# return the mask | |
yield mask | |
# increment the mask |
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
set shell=bash | |
set nocompatible | |
" disable splash | |
set shortmess+=I | |
" leader | |
let mapleader = "\<Space>" | |
nnoremap <Space> <Nop> |
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
/** | |
* Author: Ilia Choly | |
* Description: Helper macros for logging. | |
*/ | |
#include <stdio.h> | |
#include <stdlib.h> | |
#ifndef _STDIO_UTILS_H | |
#define _STDIO_UTILS_H |
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
def userInput(): | |
response = input("Enter n to deal a new hand, r to replay the last hand, or e to end game:") | |
if response == 'n' or 'r' or 'e': | |
return response | |
else: | |
print("Invalid command.") | |
return userInput() |