├── Authentication.md ├── Markdown.md ├── README.md ├── Shell.md ├── Shortener.md └── sad.md /Authentication.md: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | class Program { 5 | static Dictionary users = new Dictionary(); 6 | 7 | static void Main() { 8 | while (true) { 9 | Console.WriteLine("1. Register\n2. Login\n3. Exit"); 10 | string choice = Console.ReadLine(); 11 | 12 | if (choice == "1") { 13 | RegisterUser(); 14 | } else if (choice == "2") { 15 | LoginUser(); 16 | } else if (choice == "3") { 17 | break; 18 | } else { 19 | Console.WriteLine("Invalid option."); 20 | } 21 | } 22 | } 23 | 24 | static void RegisterUser() { 25 | Console.Write("Enter username: "); 26 | string username = Console.ReadLine(); 27 | Console.Write("Enter password: "); 28 | string password = Console.ReadLine(); 29 | users[username] = password; 30 | Console.WriteLine("User registered!"); 31 | } 32 | 33 | static void LoginUser() { 34 | Console.Write("Enter username: "); 35 | string username = Console.ReadLine(); 36 | Console.Write("Enter password: "); 37 | string password = Console.ReadLine(); 38 | 39 | if (users.ContainsKey(username) && users[username] == password) { 40 | Console.WriteLine("Login successful!"); 41 | } else { 42 | Console.WriteLine("Invalid credentials."); 43 | } 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /Markdown.md: -------------------------------------------------------------------------------- 1 | | Language | Greeting | 2 | |---------------|----------------| 3 | | Python | Hello, World! | 4 | | JavaScript | Hello, World! | 5 | | HTML | Hello, World! | 6 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # ShellScript -------------------------------------------------------------------------------- /Shell.md: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | greet() { 3 | echo "Hello, $1!" 4 | } 5 | greet "World" 6 | -------------------------------------------------------------------------------- /Shortener.md: -------------------------------------------------------------------------------- 1 | use std::collections::HashMap; 2 | 3 | fn main() { 4 | let mut url_map = HashMap::new(); 5 | url_map.insert("ggl", "https://www.google.com"); 6 | url_map.insert("yt", "https://www.youtube.com"); 7 | 8 | println!("Shortened URLs:"); 9 | for (key, url) in &url_map { 10 | println!("{} -> {}", key, url); 11 | } 12 | 13 | println!("Enter shortcode:"); 14 | let mut input = String::new(); 15 | std::io::stdin().read_line(&mut input).expect("Failed to read input"); 16 | let input = input.trim(); 17 | 18 | match url_map.get(input) { 19 | Some(url) => println!("Redirecting to: {}", url), 20 | None => println!("Shortcode not found."), 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /sad.md: -------------------------------------------------------------------------------- 1 | puts "Hello, World!" 2 | --------------------------------------------------------------------------------