Details
-
AboutI love C#. And I use the default theme of the editor/IDE (Even if white) Watch "Upgrade"
-
SkillsA lot of C#, Html, CSS, Javascript a little, Powershell quite. Bash-ing pretty good.
-
LocationBulgaria
-
Github
Joined devRant on 2/20/2017
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
-
1. O(n)
2. Container queries
3. Supercomputer with a bunch of GPUs/TPUs running for free (solar, wind power)
Genuinely thanks! -
My goal for 2019 is to write an efficient neural network library with streams and make it very very very customizable. I'll write in C#, cause fuck python script kids. My idea is to make a cool platform for new ideas8
-
Service worker.
I've been given the task to write a website for our school, where teachers would post plans, images, polls... I decided to use this new technology called service worker. Been struggling a lot with just, but hey it looks like an app and works offline.
It's really something anyone can add to any website in a week, but the advantages are quite a lot2 -
I found the weirdest UI bug.
I have a side nav bar, that opens on button click. The way it is implemented: a navbar, that is positioned a lot to the left (120% of it's width). On click, it transitions to 0%.
When I zoom in very close without the sidebar opened on an image, some text from the sidebar is visible.
Pretty weird..1 -
Hard-code a security key. It's a read-only website, only the admin needs to have a key to publish, right...4
-
This is a story of how I did a hard thing in bash:
I need to extract all files with extension .nco from a disk. I don't want to use the GUI (which only works on windows). And I don't want to install any new programs. NCO files are basically like zip files.
Problem 1: The file headers (or something) is broken and 7zip (7z) can only extract it if has .zip extension
Problem 2: find command gives me relative to the disk path and starts with . (a dot)
Solution: Use sed to delete dot. Use sed to convert to full path. Save to file. Load lines from file and for each one, cp to ~/Desktop/file.zip then && 7z e ~/Desktop/file.zip -oOutputDir (Extract file to OutputDir).
Problem 3: Most filenames contain a whitespace. cp doesn't work when given the path wrapped in quotes.
Patch: Use bash parameter substitution to change whitespace to \whitespace.
(Note: I found it easier to apply sed one after another than to put it all in one command)
Why the fuck would anyone compress 345 images into their own archive used by an uncommon windows-only paid back-up tool?
Little me (12 years old) knowing nothing about compression or backup or common software decided to use the already installed shitty program.
This is a big deal for me because it's really the first time I string so many cool commands to achieve desired results in bash (been using Ubuntu for half a year now). Funny thing is the images uncompressed are 4.7GB and the raw files are about 1.4GB so I would have been better off not doing anything at all.
Full command:
find -type f -name "*.nco" |
sed 's/\(^./\)/\1/' |
sed 's/.*/\/media\/mitiko\/2011-2014_1&/' > unescaped-paths.txt
cat unescaped-paths.txt | while read line; do echo "${line// /\\ }" >> escaped-paths.txt; done
rm unescaped-paths.txt
cat escaped-paths.txt | while read line; do (echo "$line" | grep -Eq .*[^db].nco) && echo "$line" >> paths.txt; done
rm escaped-paths.txt
cat paths.txt | while read line; do cp $line ~/Desktop/file.zip && 7z e ~/Desktop/file.zip -oImages >/dev/null; done3 -
It's the first day of school and they try to make an entertaining segment on TV.
There has been a lot of controversy whether electronic books should replace paper ones.
They ask a mother about her opinion on electronic books:
Her: I myself like the idea of lighter school bags a lot. But yesterday I tried to open one of the books on my perfectly working laptop, and it was all white. I tried to zoom but nothing changed...
People are simply not ready for that much technology in their lifes. Teachers also can't use the technology to its full potential. They have been teaching the same thing the same way for tens of years, they'll always fallback to their old methods1 -
I spent 4 hours to find I have written break instead of continue
I tried to make a Sudoku solver (using human techniques), and then I found it was NP-complete -
A rant about fucking google!
I search for a page, but my internet is pretty slow (not on wifi), so while waiting I think of somwthing else to search. And now I have 4 tabs open on my phone.
After a little while, I get the following error (see attached image). I get a little frustrated, but I'm a calm person, I decide to solve the (still loading) CAPTCHA and continue browsing.
After a little while, I get an error that my browser (Edge) is not supported and I can't open the CAPTHCA. On other websites, it has always worked just fine, but they want me to switch to their Chrome, to steal my data.
It is quite a clever trick if you think about it. Either that, or I've been hacked and there's a bot on my phone.6 -
There is a bug.
I know where the bug is.
I know what the bug is.
I tried to fix it.
Fixed a cometely different bug instead.
This repeats 5 times.
I don't call it bad luck, just talent -
I get really motivated and sit to write a lot of code and be very very productive, but then I get demotivated for twice as much time as I were coding.
I just can't write code if not super motivated. This is a very bad habit.1 -
My first packages, uploaded to nuget!
A simple neural network library, written in C# (.Net Standard)
Here's a link:
https://nuget.org/profiles/Mitiko233