This file contains 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 fizzbuzz in one line | |
# I was bored in python class, enjoy | |
for x in [ list(['FizzBuzz'] + [i]*2 + ['Fizz', i] + ['Buzz', 'Fizz'] + [i]*2 + ['Fizz'] + [i]*2 + ['Fizz'] + [i]*2)[i % 15] for i in range(0, 500) ]: print(x) |
This file contains 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
#include <string> | |
#define CAPACITY 100 | |
// copied from the internet (thanks internet) | |
unsigned long hash_function(std::string str) { | |
unsigned long i = 0; | |
for (int j=0; j < str.length(); j++) | |
i += str.at(j); | |
return i % CAPACITY; |
This file contains 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 | |
echo -e "Hello! this is a shell script to help you get microsoft fonts straight from a Windows 10 ISO. \nThis can be used for any language." | |
[ "$EUID" -ne 0 ] && echo "Please run this script as root." | |
[ ! -x "$(command -v 7z)" ] && echo "You need 7z installed in order for the scipt to run" | |
echo enter iso file path: | |
read ISOPATH |
This file contains 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
[module/mic-volume] | |
type = custom/script | |
exec = echo "Mic Vol 🎙️: $(amixer sget Capture | grep "Front Left" | sed -n 2p | awk '{ print $5 }')" | |
interval = 2 |
This file contains 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 | |
[ -d /home/aggam/backups/folders$(date '+%d%B%Y') ] && rm -rf /home/aggam/backups/folders$(date '+%d%B%Y') | |
while read p; do | |
echo $p | |
mkdir /home/aggam/backups/folders$(date '+%d%B%Y') | |
cp -r $p /home/aggam/backups/folders$(date '+%d%B%Y') | |
done </home/aggam/backups/foldersToBackup |
This file contains 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
;Aggam Rahamim | |
IDEAL | |
MODEL small | |
STACK 100h | |
DATASEG | |
; -------------------------- | |
; Your variables here | |
; -------------------------- | |
smaller db 0 | |
final db 0 ; final result |
This file contains 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
#include <stdio.h> | |
int main( int argc, char *argv[]) { | |
if (argc < 2) | |
printf("must supply argument - range"); | |
int devisors = 0, num, devisor, largest, range = atoi(argv[1]); | |
for (num = 7; num < range; num += 2) { |