Skip to content

Instantly share code, notes, and snippets.

View astroDev18's full-sized avatar
🕹️
Learning C++

Isa astroDev18

🕹️
Learning C++
  • Atlanta, Georgia
  • 01:19 (UTC -12:00)
View GitHub Profile
@astroDev18
astroDev18 / MySizes2.java
Created January 21, 2021 17:04
Trying If Statements Trying If Statements
import java.util.Scanner;
public class MySizes2 {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
System.out.println("Please input your pant size: ");
int number = input.nextInt();
if (number == 10) {
System.out.println("Small pants");
@astroDev18
astroDev18 / forLoop.java
Created January 25, 2021 16:08
forLoop
import java.util.Scanner;
public class forLoop {
public static void main(String[] args) {
for (int counter = 1; counter <= 5; counter++) {
char c;
Scanner scan = new Scanner(System.in);
System.out.println("Please Input your grades, only use one letter.");
try {
String s = scan.next();
@astroDev18
astroDev18 / JavaGame.java
Created January 26, 2021 22:59
guessinggame
import java.util.Scanner;
import java.util.Random;
public class JavaGame {
public static void main(String[] args) {
System.out.println("Hello, Welcome to my guessing game! Input a number and see if your guess was correct.");
Scanner input = new Scanner(System.in);
int user_guess = input.nextInt();
Random random = new Random();
int genNumber = random.nextInt(10);
@astroDev18
astroDev18 / airplanes.java
Last active February 28, 2021 23:30
airplane wiki
// Write code for a parent class that contains at least three variables of at least two types,
// and at least one method.
// Create at least three new classes based on your parent class, and modify the objects they contain as needed.
// Create a package to bundle your classes. Write source code files for the classes in your package.
package MyPackage;
import java.util.Scanner;
class aircraft {
int passengers; // Numbers of people
int cruiseSpeed; // Speed of aircraft
@astroDev18
astroDev18 / versions.sh
Created October 12, 2021 07:52
updates version on json dependencies
#!/bin/bash
#updates dependencies
cat versions.json | \
jq -r '.devDependencies | keys[]' | \
xargs -I {} npm i -S {}@latest
#!/bin/bash
#updates dependencies
echo "This is a program to update you NPM dependencies"
echo "Here are the current versions of your dependencies"
cat versions.json | \
jq -r '.devDependencies'
echo "Would you like to update your dependencies to the latest version."
read answer
#!/bin/bash
#updates dependencies
echo "This is a program to update you NPM dependencies"
echo "Here are the current versions of your dependencies"
cat versions.json | \
jq -r '.devDependencies'
echo "Would you like to update your dependencies to the latest version."
read answer
#updates dependencies
echo "This is a program to update you NPM dependencies"
echo "Here are the current versions of your dependencies"
cat versions.json | \
jq -r '.devDependencies'
echo "Would you like to update your dependencies to the latest version."
read answer
if [ ${answer} = 'y' ];
then
@astroDev18
astroDev18 / Telnet AES Encrypter
Last active November 2, 2021 11:46
Building out AES-256 bit encryption in Go, also added in telenet so a user can connect to the local port and access the program. To run use 'go run server.go 8080' and then connect to it on a separate terminal with telenet localhost 8080 and then just type in your text. Enjoy!
package main
import (
"bufio"
"crypto/aes"
"crypto/cipher"
"crypto/rand"
"encoding/hex"
"fmt"
"io"
package main
import (
"log"
"net/http"
"net/http/httputil"
"net/url"
)
func main() {