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
RewriteEngine On | |
RewriteCond %{HTTPS} !on | |
RewriteCond %{REQUEST_URI} !^/[0-9]+\..+\.cpaneldcv$ | |
RewriteCond %{REQUEST_URI} !^/\.well-known/pki-validation/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$ | |
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] |
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
/* | |
* USAGE: <DebugJson data={{"hello": "hello world!"}} /> | |
*/ | |
import React from 'react'; | |
const DebugJson = ({data}) => { | |
return ( | |
<pre className={"mt-2 p-2 overflow-x-auto whitespace-pre-wrap break-words"}> |
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
import java.math.BigInteger; | |
import java.util.Random; | |
import java.util.Scanner; | |
public class RobinMillerPrimalityTest { | |
private static final BigInteger ONE = new BigInteger("1"); | |
private static final BigInteger TWO = new BigInteger("2"); | |
public static void main(String[] args) { |
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
import java.util.Scanner; | |
public class PrimeComposite { | |
// calculate the remainder of the given number | |
public static int reminder(int numb, int divisor) { | |
return Math.floorMod(numb, divisor); | |
} | |
public static void main(String[] args) { | |
System.out.print("Enter a number: "); |
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
import javax.crypto.*; | |
import javax.crypto.spec.DESKeySpec; | |
import java.security.InvalidKeyException; | |
import java.security.NoSuchAlgorithmException; | |
import java.security.spec.InvalidKeySpecException; | |
import java.util.Arrays; | |
import java.util.Scanner; | |
public class DesCrypto { | |
public static void main(String[] args) throws |
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
https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet |
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
import http.server as httpserver | |
import socketserver | |
def main(port=None): | |
if port is None: | |
port = 8000 | |
handler = httpserver.SimpleHTTPRequestHandler | |
try: | |
httpd = socketserver.TCPServer(("", port), handler) | |
print("serving at port", port) |