# 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
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
// bevy = "0.11.0" | |
// bevy_rapier3d = { version = "0.22.0", features = [ "simd-stable", "debug-render-3d" ] } | |
// Pan + Orbit camera code: https://bevy-cheatbook.github.io/cookbook/pan-orbit-camera.html | |
// Use the right mouse button to rotate, middle button to pan, scroll wheel to move inwards/outwards. | |
use bevy::prelude::*; | |
use bevy_rapier3d::prelude::*; | |
use bevy::input::mouse::{MouseWheel,MouseMotion}; | |
use bevy::render::camera::Projection; |
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
/* | |
Reliability and Flow Control Example | |
From "Networking for Game Programmers" - http://www.gaffer.org/networking-for-game-programmers | |
Author: Glenn Fiedler <[email protected]> | |
*/ | |
#include <iostream> | |
#include <fstream> | |
#include <string> | |
#include <vector> |
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
" Vim color file | |
" | |
" Author: Tomas Restrepo <[email protected]> | |
" | |
" Note: Based on the monokai theme for textmate | |
" by Wimer Hazenberg and its darker variant | |
" by Hamish Stuart Macpherson | |
" | |
hi clear |
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
// fork from https://github.com/irl/la-cucina/blob/master/str_replace.c | |
char* str_replace(char* string, const char* substr, const char* replacement) { | |
char* tok = NULL; | |
char* newstr = NULL; | |
char* oldstr = NULL; | |
int oldstr_len = 0; | |
int substr_len = 0; | |
int replacement_len = 0; | |
newstr = strdup(string); |
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
#!/bin/sh | |
if [ ! $# == 1 ]; then | |
echo "How To Use:" >&2 | |
echo " ./spotlight.sh [load|unload]" >&2 | |
exit | |
elif [ ! $1 == 'load' ] && [ ! $1 == 'unload' ]; then | |
echo "How To Use:" >&2 | |
echo " ./spotlight.sh [load|unload]" >&2 | |
exit |
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
#!/bin/sh | |
if [ ! $# -eq 1 ]; then | |
echo "How To Use:" >&2 | |
echo " ./show_all.sh [Yes|No]" >&2 | |
exit | |
elif [ ! $1 == 'Yes' ] && [ ! $1 == 'No' ]; then | |
echo "How To Use:" >&2 | |
echo " ./show_all.sh [Yes|No]" >&2 | |
exit |
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
#!/bin/sh | |
if [ ! $# -eq 1 ]; then | |
echo "How To Use:" >&2 | |
echo " ./dashboard.sh [enable|disable]" >&2 | |
exit | |
fi | |
if [ $1 == 'enable' ]; then | |
X='No' |
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 main | |
import ( | |
"flag" | |
"fmt" | |
"log" | |
"net" | |
"sync" | |
"sync/atomic" | |
"time" |
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
// | |
// How to set timeout for http.Get() in golang | |
// | |
package main | |
import ( | |
"io" | |
"io/ioutil" | |
"log" | |
"net" |
NewerOlder