Skip to content

Instantly share code, notes, and snippets.

View akionsight's full-sized avatar
🤔
Think.

AkIonSight akionsight

🤔
Think.
View GitHub Profile
@akionsight
akionsight / wifi.sh
Last active October 23, 2021 10:24
A script to get Archer TU Nano Wifi adapter to work on linux
sudo apt install git dkms
git clone https://github.com/aircrack-ng/rtl8812au.git
cd rtl8812au
sudo make dkms_install
@akionsight
akionsight / regular_firefox.sh
Created October 23, 2021 10:20
A script to remove snap based firefox and install regular firefox on ubuntu 21.10 and above (if any)
echo -e "Script: removing the snap version of firefox \n"
sudo snap remove firefox
echo -e "\nScript: Temporarily stopping snapd (snap daemon)\n "
systemctl stop --now snapd
echo -e "\nScript: Installing (regular) firefox \n"
@akionsight
akionsight / update_packages.sh
Last active July 13, 2021 06:09
A small gist to upgrade your apt packages in a single command
### After getting this script, execute the command `sudo bash update_packages.sh` to start the upgrade
echo -e "\nStarting Update\n"
apt-get update
echo -e "\nrevised package lists of arrived\n"
echo -e "\nupgrading packages\n"
@akionsight
akionsight / accurate_8_ball.py
Last active January 4, 2023 09:03
the most accurate software-based 8 ball ever, play it
import random
import hashlib
import time
def main():
choices = ['As I see it, yes.', 'Ask again later.', ' Better not tell you now.', ' Cannot predict now.', 'Concentrate and ask again.', 'Don’t count on it.', 'It is certain.', ' It is decidedly so.', ' Most likely.', 'My reply is no.', 'My sources say no.', 'Outlook not so good.', ' Outlook good.', 'Reply hazy, try again.', 'Signs point to yes.', ' Very doubtful.', ' Without a doubt.', ' Yes.', 'Yes – definitely.', 'You may rely on it.']
question = input('Enter your question: ')
hash_question_object = hashlib.sha256(question.encode())
@akionsight
akionsight / i_love_time.html
Last active May 22, 2021 08:07
I love time, made for samuel miller "i roast your stupid code" see hosted netlify link below or click https://ilovetime.netlify.app
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<!-- <link rel="stylesheet" href="style.css" /> -->
<!-- <script src="main.js" defer></script> -->
<title>#I LOVE TIME</title>
</head>
@akionsight
akionsight / github_emojis_download.py
Created January 25, 2021 03:21
A script to download all the emojis from the Github REST API
import requests
import os
import json
def download_emojis(FOLDER_PATH, EMOJIS_URL, flag=None):
'''
download images from the Github Emojis API
'''
try:
@akionsight
akionsight / backup.py
Created January 3, 2021 05:52
Auto backup a specific folder to a drive (external or internal)
import schedule
import os
os.system('pip install schedule')
# change this to your own drive (this drive acts as the backup drive)
DRIVE_LOCATION = 'D:\\'
# change this to the folder you want to backup (this folder will be backed up)
FOLDER_TO_BE_BACKED_UP = 'SOME_FOLDER'
# this will be the interval between backup's defualts to 10 seconds (change it to suit your needs)
BACKUP_FREQUNCY = 10
@akionsight
akionsight / counter.html
Created December 24, 2020 15:04
Just a simple counter with html and javascript
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Counter</title>
</head>
<body>
<h1 id="number">0</h1>
<button id="up-button">Up Button</button>
@akionsight
akionsight / fizzbuzz.js
Created December 23, 2020 07:52
Fizz Buzz in js (node)
for (i = 1; i < 100; i++) {
if (i % 3 === 0 && i % 5 === 0) {
console.log('FizzBuzz')
}
else if (i % 3 === 0) {
console.log('Fizz')
}
else if (i % 5 === 0) {
@akionsight
akionsight / map_fizzbuzz.py
Created December 18, 2020 05:42
A small fizzbuzz using map() in python
## FIZZBUZZ
def fizz_buzz_fizzbuzz(number: int):
if number % 3 == 0 and number % 5 == 0:
return 'FizzBuzz'
elif number % 3 == 0:
return 'Fizz'
elif number % 5 == 0:
return 'Buzz'
else: