Skip to content

Instantly share code, notes, and snippets.

View SmashedFrenzy16's full-sized avatar
:atom:
Working towards my next project!

SmashedFrenzy16 SmashedFrenzy16

:atom:
Working towards my next project!
View GitHub Profile
@SmashedFrenzy16
SmashedFrenzy16 / double-array.d
Created July 22, 2022 15:12
A program that doubles each number in an array. This was made in D.
void main()
{
import std.stdio : writeln;
int[] arr = [1, 6, 23, 678, 212, 5, 96, 52];
int i = 0;
while (i < arr)
{
@SmashedFrenzy16
SmashedFrenzy16 / hello-world.d
Created July 22, 2022 14:31
"Hello World" in D.
import std.stdio;
// Driver code
void main()
{
writeln("Hello, World");
}
@SmashedFrenzy16
SmashedFrenzy16 / adding-calculator.js
Created April 3, 2022 17:04
An adding calculator made in JavaScript.
var firstNum = window.prompt("First number: ");
number1 = parseInt(firstNum);
var secondNum = window.prompt("Second number: ");
number2 = parseInt(secondNum);
alert("Press OK to see results.");
@SmashedFrenzy16
SmashedFrenzy16 / sample_data.tex
Created April 3, 2022 17:01
Sample data for a table/graph made in TeX!
\documentclass[a4paper, 12pt]{article}
\begin{document}
\title{Sample Data}
\author{SmashedFrenzy16}
\date{\today}
\maketitle
@SmashedFrenzy16
SmashedFrenzy16 / favorite-crisps.r
Created April 3, 2022 16:57
A bar chart made in R that shows people's favorite crisps!
fav.crisps <- c(30, 21, 10, 13)
barplot(fav.crisps,
main = "People's Favorite Flavour Of Crisps",
xlab = "Number Of Students",
ylab = "Crisps Flavour",
names.arg = c("Plain", "Chilli", "Cheese + Onion", "Lime"),
col = "red",
horiz = TRUE)
@SmashedFrenzy16
SmashedFrenzy16 / cli-hanoi-tower.py
Last active March 4, 2023 10:36
A command-line Hanoi Tower made in Python!
def towerOfHanoi(n, fromRod, toRod, auxRod):
if n ==0:
return
towerOfHanoi(n-1, fromRod, auxRod, toRod)
print("Move disk",n,"From rod",fromRod,"to rod",toRod)
@SmashedFrenzy16
SmashedFrenzy16 / name_inputter.sh
Created April 3, 2022 16:54
A name inputter Shell Script.
#!/bin/bash
echo "What is your name?"
read USER_NAME
echo "Hi, $USER_NAME!"
@SmashedFrenzy16
SmashedFrenzy16 / Date-And-Time.html
Created April 3, 2022 16:52
A date and time button made in JavaScript embedded into a HTML file.
<!DOCTYPE html>
<html>
<head>
<title> JS Date And Time </title>
</head>
@SmashedFrenzy16
SmashedFrenzy16 / string_concatenator.sh
Created April 3, 2022 16:51
A string concatenator made in Shell Script.
#!/bin/bash
clear
echo "enter 2 strings: "
read "str1"
read "str2"
str3=`echo $str1 $str2`
@SmashedFrenzy16
SmashedFrenzy16 / password_generator.py
Created April 3, 2022 16:49
A password generator made in Python.
import string
import random
letters = list(string.ascii_letters)
numbers = list(string.digits)
special_characters = list("!£$%^&*()@#")
characters = (string.ascii_letters, string.digits, special_characters, "!£$%^&*()@#")
def random_password():