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
// This is a basic program on Java | |
// | |
// Try to modify and run it and check out | |
// the output in the terminal below | |
// | |
// Happy coding! :-) | |
import java.util.Random; | |
public class App { | |
public int min; |
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
#This works for most things with discord, such as servers, messages, etc. | |
import datetime | |
def getSnowflakeTimestamp(snowflake): | |
DiscordEpoch = 1420070400000 | |
input = snowflake | |
UnixTSinMS = input / 4194304 + DiscordEpoch | |
out = str(datetime.datetime.fromtimestamp(UnixTSinMS/1000.0)) | |
print("Creation date: " + out) |
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 | |
# FUNCTION | |
isSiteUp () { check=`curl -Is $1 | head -1 | awk '{print $2}'`;if [ "$check" = "200" ]; then return 1; else return 0; fi; } | |
# EXAMPLE USAGE | |
siteToCheck="https://qrng.anu.edu.au/API/jsonI.php?" #This is a quantum random number api but any url should work. | |
test=`isSiteUp $siteToCheck` | |
if [ "$?" = "1" ];then | |
echo "The website at: [$siteToCheck] is [ONLINE]" | |
else |
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
import string, random | |
# Credit to dunnousername#8672 | |
# return all unique strings from charset y of length l. | |
# y must be entirely unique chars. | |
def g(y, l): | |
if l == 1: | |
# we're just looking for single-char sequences | |
# just yield each char in the charset |