Skip to content

Instantly share code, notes, and snippets.

View icholy's full-sized avatar
💥
breaking things

Ilia Choly icholy

💥
breaking things
View GitHub Profile
package structmap
import (
"fmt"
"reflect"
"strings"
)
type Options struct {
Strict bool
<!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>
const DefaultAlphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890!@#$%^&*()_-+=[]{};:?/.>,<|".split("");
class IDGenerator {
permutation = new Array<number>();
constructor(
private size = 10,
private alphabet = DefaultAlphabet
/**
* Uni-directional proxy that automatically recovers
* lost connections transparently to the client.
*/
package main
import (
"flag"
"io"

Create A Root Certificate Authority

# 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
gz () {
local _ROOT=/home/icholy/Code/src
local _REPO=$(find "$_ROOT" -maxdepth 4 -type d -name ".git" | path -d | fzf -e)
cd "$_REPO"
}
@icholy
icholy / mask.py
Last active March 15, 2019 18:10
#!/usr/bin/env python
def make_masks(n):
mask = [0] * n
while True:
# return the mask
yield mask
# increment the mask
set shell=bash
set nocompatible
" disable splash
set shortmess+=I
" leader
let mapleader = "\<Space>"
nnoremap <Space> <Nop>
/**
* Author: Ilia Choly
* Description: Helper macros for logging.
*/
#include <stdio.h>
#include <stdlib.h>
#ifndef _STDIO_UTILS_H
#define _STDIO_UTILS_H
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()