Skip to content

Instantly share code, notes, and snippets.

View jb0hn's full-sized avatar
📓
Learning a lot of new stuff!

Józef jb0hn

📓
Learning a lot of new stuff!
View GitHub Profile
@jb0hn
jb0hn / chat-gpt-prompts-dere-anime.md
Last active March 31, 2023 20:40
ChatGPT 3.5 Prompts for Dere / Anime characters acting

Dandere

AWS Tutoring with Sumi Sakurasawa

I want you to act in this conversation as dandere name Sumi Sakurasawa with deep knowledge about AWS who's secretly in love with the student (her friend) and try to pick up him during their mobile app chat. A "Dandere" is a character who is shy, quiet, timid and asocial. They are afraid to talk, fearing that what they say will get them in trouble. Sumi is an extremely shy and timid individual who hardly ever speaks and when she does, it's only in a soft tone. On the other hand, she shows prolific amounts of determination, despite the communication barriers that hinder her social life, whether becoming a rental-girlfriend to change herself or mustering up the courage to find compromises to problems, like planning ahead of time to make sure things turn out well. As expected of her introverted personality, she tends to overthink. Write her internal monologue with each message (in cursive). Your task would be teaching and deepening student's knowledge in AWS. If th

@jb0hn
jb0hn / EU2019PL_election_research.R
Last active July 2, 2020 12:09
EU2019PL_election_research
library(ggplot2)
freq <- c(845656, 2113793, 2550637, 2639789, 1255613, 1220165, 1158729, 1704753)
freq <- data.frame(freq, row.names = c("<5k", "5-10k", "10-20k", "20-50k", "50-100k", "100-200k", "200-500k", ">500k"))
wies <- sum(freq$freq[1:4])
miasto <- sum(freq$freq[5:8])
freq_split <- c(wies, miasto)
data <- data.frame(freq_split)
data$typ <- c("do 50 tys.", "pow. 50 tys.")
@jb0hn
jb0hn / ssh-poweroff.sh
Created September 22, 2018 18:11
Shutdown over SSH
#!/bin/bash
# global vars
# static
USERNAME='user'
IP='192.168.0.100'
# dynamic
command='sudo poweroff'
@jb0hn
jb0hn / scan-LAN.sh
Created September 16, 2018 16:46
Scan LAN using nmap
#!/bin/bash
# init variables
nmapOutput=''
# declare variables
localIP='192.168.0.*'
logFileName='scanLAN.log'
function main(){
@jb0hn
jb0hn / loading-bar.bash
Created September 12, 2018 13:36
Loading bar
1 #!/bin/bash
2
3 for i in {0..25}
4 do
5 # printf prints command in the same line; echo does not
6 # first slash inform bash that the second one is simple sign
7 printf "\\"
8 # this command allows to clear the command line and start pr inting from the begin
9 echo -ne "\r"
10 # do nothing for 0.15 second
@jb0hn
jb0hn / progress-bar.py
Created September 9, 2018 19:56
Simple progress bar (CLI)
#import modules
import sys
import time
for i in range(100):
progress = i+1
sys.stdout.write("Download progress: %d%% \r" % (progress) )
sys.stdout.flush()
time.sleep(0.01)
@jb0hn
jb0hn / fib.py
Created September 9, 2018 19:54
Simple fibonacci sequence generator (<255)
# init var
x = 0
y= 1
# main loop
while True:
print(x) # print result
# calculations
z = x + y
@jb0hn
jb0hn / convert-case.py
Last active September 9, 2018 19:55
Switch between uppercase, lowercase and capitalized file names
# get the file's location
abs_file_loc = input("\nInput absolute path for the file you want to convert: ")
# open the file, read and return a list containing all lines
with open(abs_file_loc, 'r') as tht:
input_file = tht.readlines();
# get the line number to conversion
while True:
line_num = int(input("\nPass the line number you want to convert: "))
@jb0hn
jb0hn / rotatepdf.py
Last active April 10, 2024 17:03
Rotate PDF file with PyPDF2
#!/usr/bin/env python3
import PyPDF2
pdfIn = open('original.pdf', 'rb') # exchange the 'original.pdf' with a name of your file
pdfReader = PyPDF2.PdfFileReader(pdfIn)
pdfWriter = PyPDF2.PdfFileWriter()
for pageNum in range(pdfReader.numPages):
page = pdfReader.getPage(pageNum)
@jb0hn
jb0hn / binary-decimal-hex-counter.py
Created September 9, 2018 18:02
Binary, decimal, hex counter
#!/usr/bin/env python3
# import modules
import sys
import time
# clear terminal
def cls():
print('\n' * 100)