#Bash programming
Explore tagged Tumblr posts
astarsor · 8 months ago
Text
Tumblr media
in another life
Tumblr media
to think that haruka's trust in premium adventure is basically kiryu daydreaming......... ough (source)
593 notes · View notes
ailurinae · 8 months ago
Text
you shouldn't need to cat the link file. I think… just for i in media-links.txt; ? Not sure of syntax, on my phone in bed RN
For the URL encode issue, try mv "$file" "${count}-${file}"
Always quote your vars, and use the curly braces too if needed
also seems like file=echo $i is useless? It simplifes down to file=$i as far as I can tell (while adding a chance of unquoted spaces and such)? Just use $i later on in the mv, should be the same.
I hope this may help, on the other hand like I said this all out of my brain no testing or even lookup cause on my phone and its a pain, so maybe it is useless and wrong LOL
Also check out the linter "shellcheck", it is fucking rad.
So, wrote a dumb bash thing
$> count=$(wc -l media-links.txt) $> for i in $(cat media-links.txt); do wget $i; file=echo $i | awk -F '/' '{print $NF}'; mv $file $count-$file; count=$((count - 1)); sleep 2 ; echo ================================; done
It mostly works, although that sleep apparently needs to be longer because I was getting of "ERROR 429: Too Many Requests".
The rename doesn't always work because sometimes the URL has a URL encoded character, which gets decoded by wget when the actual file gets saved. e.g.
--2024-07-01 00:11:17-- https://static1.squarespace.com/static/55dca83de4b018ac1524526f/t/622990a6d88dfa624f168cbd/1646891207920/Samuel+Spruce%2C+The+Little+Wooden+Boy+in_+The+Frosty+Wood.mp3 Resolving static1.squarespace.com… 146.75.32.238 Connecting to static1.squarespace.com|146.75.32.238|:443… connected. HTTP request sent, awaiting response… 200 OK Length: 33151680 (32M) [audio/mpeg] Saving to: ‘Samuel+Spruce,+The+Little+Wooden+Boy+in_+The+Frosty+Wood.mp3’ Samuel+Spruce,+The+Little+Wooden+Boy+in_+The+Frosty 100%[=================================================================================================================>] 31.62M 20.2MB/s in 1.6s 2024-07-01 00:11:19 (20.2 MB/s) - ‘Samuel+Spruce,+The+Little+Wooden+Boy+in_+The+Frosty+Wood.mp3’ saved [33151680/33151680] mv: can't rename 'Samuel+Spruce%2C+The+Little+Wooden+Boy+in_+The+Frosty+Wood.mp3': No such file or directory
Anyway, that's a problem for future me.
14 notes · View notes
starry-bi-sky · 1 year ago
Text
Danyal Al Ghul's missed potential - this kid is not gonna behave like his canon self if he's with the league of assassins until his late formative years, and my reasoning why
(feel free to take this all with a grain of salt this is just my thoughts on it, this is all mostly amusing to me and isn't trying to be negative towards anyone else)
similar to how i was talking about how danny growing up in crime alley would affect him, demon twin aus with danyal al ghul make me laugh a lot (affectionate) because... whose teaching danny to unlearn all the ecofascism he picked up from the league of assassins? whose teaching him to be kind? to be gentle? Not the LoA thats for certain.
(you could plausibly say Jazz but she's only 2 years older than Danny and do you really expect a fellow child to properly explain why X is wrong to another child and have it be 100% effective? i don't doubt it'd help to an extent, but not in the same way an adult explaining it would)
plus a ton of other things, like whose teaching him to value human life? not the LoA. Whose teaching him how to adjust to living with American society after he ends up with the Fentons when he's 8-9-10? Who teaches him that killing is wrong, whose enforcing that?
(not the Fentons if you're going the neglectful parent route, and Jazz can try but i really don't think Danny is going to listen to her, a stranger who isn't even part of his grandfather's league)
How do you teach a child to value human life when the greatest development window for that opportunity has closed and he's already formed his own opinions?
You're not gonna get a Danny whose exactly like his canon attitude if he's staying with the league during his formative years (0-8 years old). you're not. You could get someone LIKE it, potentially, or someone who has traces of it or is similar -- like danny's wit and jokes and sarcasm, and on some level his kindness. but you're not gonna have a carbon copy. Development doesn't work that way. "nature" can only do so much in the face of nurture.
If anything, it doesn't even have to be a major change -- in the league he cans till be kind, but it's probably going to manifest in a different way than what is considered normal. Tough love, for one. But there's gonna be something that affects him negatively. Why make him 'always good/kind' when you can make him a brat who develops into a kinder (if spikier than in canon) person?
TLDR: Danyal Al Ghul would not be like how he is in canon if he's with the league until his late formative years -- not without any lasting pr permanent impacts from the league at least. Missed potential to make him an absolute nightmare like damian was -- especially in his early years when he first arrived to the Fenton house.
(this doesn't apply to danyal al ghul aus where he's either given to the fentons as a baby/is reincarnated/etc. this is mostly aimed for danyal al ghul aus where he fakes his death at like, 7-10 and somehow ends up, personality-wise like his completely canon self by 14 without any differences.)
(and even then if he's five or four, or even three, he would still be traumatized and influenced by the league. he'll just have more time to adjust. the sooner he leaves the league the more likely he is to be like his canon self, but not like an exact copy)
(more under the cut)
Anyways what I'm saying is that there is prime missed Danyal al Ghul potential to make him an absolute NIGHTMARE to the Fentons however way he ends up with them, just like Damian was with the Waynes! Cuz why does Damian get all the fun? Danny got the same training and endoctrine as him! He is also an ex-assassin! Why is Danny the only one who is 'well adjusted and non-violent' hm? Hmm?
Why can't he also be mean, and stabby, and a total stuck-up in some way or another? Have fun with his characterization, its prime opportunity to play play-doh and clay with him! If he starts out as X how does he get the personality traits of Y, and thus become XY?
Like take this with a grain of salt if you will, but make him arrogant. Make him an asshole! Make him a bad person at first! Because he will be! He's the blood son of the batman and you mean to tell me that damian is the only one arrogant about it at first? Make him stabby and mean even at 14 when he's begun to chill out! Have fun with it! If he's with the Fentons at any point past the age of four or five then he's gonna be a nightmare to handle because he still remembers the league and his time there.
(and while it gives him more time to chill the hell out, his time at the league is still gonna leave an impact on him.)
also what im saying as well is have him and sam potentially get along like a house on FIRE. Again, Danny grew up under the views of an ecofascist cult and nobody to challenge those views to him until he got to amity park at whatever age in late formative years he was at. He could be about as intense or even MORE intense about environmental awareness/rights than Sam is!
(also him being supremely unimpressed with Sam's wealth. he gave up a palace in the mountains for this town. because that's funny to me - like let his past have more influence on him! it'll be fun!)
you could have a danny who doesn't kill but doesn't fully understand the value of human life because jazz is like two years older than him and isn't that good at explaining why people's lives are important. he won't kill but he's not morally opposed to it. there's very little chance he actually gets bullied at school because he nearly killed Dash the first time he tried anything.
Danny could have scars, physical ones, because its implied in multiple canon that training starts at toddling (my best bet is 3 at minimum and ~maybe~ 2 but only on the later side of 2. Good fucking luck getting any infant under 2 to do anything you ask, ESPECIALLY assassin training. They're gonna stick the weapon in their mouth sooner than they're gonna do katas. This is coming from a daycare teacher.)
there's more examples of how danny being at the league during his formative years would affect him, but those are just some of them. he could have a sword! An appreciation for weaponry and nature. Maybe he still speaks all shakespearan and formal, does he still make bodily threats to people? If Damian is still threatening people at 14 why can't danny?
#dpxdc#dp x dc#dp x dc crossover#dpxdc crossover#dpdc#tldr danyal al ghul has a ton of missed potential of what his behavior would be like if he left the league mid-to-late formative years#this post is specifically directed towards those danyal al ghul posts where he ends up with the fentons when he's like. 8#like great. who taught him to unlearn all of the LoA's programming#how is he exactly like he was in canon despite being with the LoA during his early childhood#source: i've taken multiple child development classes#this isnt to bash those aus at all its just me thinking its hilarious that danny would even remotely be like his canon personality#especially if he's in the league long enough for damian to remember him#like i love danyal al ghul aus i just think there's not enough being taken into account about how the league would permanently impact him#especially if he leaves later on in life#people are not ponds they are puddles of mud. if you drop a rock into it it's gonna change its shape#its also good creative exercises on how to flesh characters out better and better understand how things in a story may impact a character#good thought exercises with the additional bonus of making danny a violent gremlin like damian is#i dont wanna say this is bashing but i guess it is kinda a criticism on the writing in those aus because you’re telling me this had NO#affect on danny on his personality beyond just ‘oh league bad. league scary’?? cmonnn have some fun#like you mean to tell me that being a child assassin had no lasting impact on him or his personality?? like at all???#he doesnt have an ounce of self-importance/arrogance/anger like damian did?? like none of that *stuck?* he’s just the normal and sane#sibling right off the bat??? five years with the fentons turned him into a complete blankslate?? he has no lasting impact from the league??
186 notes · View notes
nixcraft · 7 months ago
Text
bash to python
Tumblr media
96 notes · View notes
cerulity · 2 months ago
Text
Physical media seems to be making a resurgence. While I won't use full-on CDs, I'm finding it much more fruitful to use localised content instead of streaming services. I have an entire folder of BPM-sorted music that I will just go through. Today I learnt Bash to make a really simple shuffler.
Tumblr media
This is all that's needed to shuffle a playlist. A playlist is a file that just has a list of file names.
I think Linux's environment is perfect for this. For one, Bash supports wildcards, so you can do "directory/*" to add all files in that directory to the playlist. The cat command also allows you to pass multiple files, so you can merge multiple playlists together just by passing them as arguments. Symbolic (or even hard) links mean you can have a directory of files for a collection without taking up any extra space because of duplicates. Lastly, a more cosmetic feature, unlike Windows, which discerns file types based on extension, Linux (and Linux programs) discern file types based on content, so you don't even need an extension on your files for this to work.
Other than that, I think this solution is also good all-around because you control everything. You aren't limited to what the streaming service provides. You can support the artists on Bandcamp to get .flac files, which are generally the highest quality kinds of files you can get, it doesn't need any internet, and it's completely free (barring audio acquisition). I might work on a local audio player for mobile. One probably already exists, but I'd like to take a stab at it.
51 notes · View notes
iamthevampqueen · 4 months ago
Text
Tumblr media
Tooth fairy’s new skin is so pretty
31 notes · View notes
dario48gay · 11 months ago
Text
so yea, I automate booping
maybe you saw it, prob you didn't, but I automated booping
but dario, you probably aren't asking, how can I do it too in a simple yet powerful way?
well, I'm here to answer the question nobody asked, with a little bit of bash
first, choose you victim(s)
Tumblr media
this goober will do
then boop em
Tumblr media Tumblr media
next, open inspect elements and navigate to the network tab
Tumblr media
now press the bin to clear everything
Tumblr media
now boop
Tumblr media
when you have done that various GET requests will have appeared, choose the boop one, right click->copy as->copy as cURL
Tumblr media
this will give you your cookie too, this kind of cookie mus NEVER, and I repeat NEVER be shared, it gives access to your account bypassing any kind of 2fa
then create a basic bash script, just a for loop will do but if u don't know what u are doing, copy this (if on windows copy as powershell instead and figure it out)
Tumblr media
no, I did not cum on the script, I censored my cookie
this will trigger the anti-spam, so putting a sleep 0.1s before the done might be useful
the script is (put whatever you want instead of 100)
for i in {1..100}; do
[insert the curl]
[optional]sleep 0.1s
done
69 notes · View notes
patchdotexe · 24 days ago
Text
help girl. matt put me in front so we could try drawing/animating but i haaaave no inspiratioooonnnnn
9 notes · View notes
theowlgoesmoo · 7 months ago
Text
Tumblr media
Follow up to
This was one of those pieces that I eventually realized I'd never finish to satisfaction, so here it is as it... well, is.
Captain Hopper managed to snatch the little princess up and began flying back to base with his prize, only to realize he had a stowaway. Better let go, boy. This bike ain't built for three.
Flik agrees. Now if only he can persuade the captain to give up his seat...
12 notes · View notes
sinesalvatorem · 7 months ago
Text
Fix Settings in Gnome Terminal (linux)
#!/bin/bash
_setProfile() { gsettings set org.gnome.Terminal.Legacy.Profile:/org/gnome/terminal/legacy/profiles:/:$1/ $2 $3; } _setTerminalProfile() { prof=$(gsettings get org.gnome.Terminal.ProfilesList default | tr -d "'"); _setProfile $prof use-theme-colors false; _setProfile $prof background-color '#000000'; _setProfile $prof foreground-color '#FFFFFF'; _setProfile $prof use-transparent-background true; _setProfile $prof background-transparency-percent 60
} _setTerminal() { yay -Runs gnome-terminal; yay -S gnome-terminal-transparency; _setTerminalProfile; yay -Runs gnome-console; }
_setTerminal
9 notes · View notes
monaddecepticon · 8 months ago
Text
Little known programming fact:
The amount of slowness in software is constant.
Exercise for the reader: find the symmetric property due to Noether
C++ achieves fast executables by pushing all the slowness into the build process.
A Project which would build for go in 20 minutes will build for 8 hours for C++ for a 1% speed-up in runtime.
6 notes · View notes
ectonurites · 2 years ago
Text
current stress level: we have an event tonight and the programs for it STILL haven't been approved/gone to print
25 notes · View notes
brightgreendandelions · 2 years ago
Text
Tumblr media
what do you think is the chance it will work?
(i haven't tested this at all)
21 notes · View notes
pridemother-scribbles · 2 years ago
Text
Tumblr media
Even if theres no art fight this year, gotta dress up the gals in properly themed attire!
26 notes · View notes
stevensaus · 6 months ago
Text
Tumblr media
It's only been a short while since I wrote daywall, a program that automagically chooses a wallpaper whose brightness is determined by the time of day it is. I've made one tweak to the default brightness values -- it was getting too bright before sunrise for me -- but that's something you can do with tweaking the script itself. I also added a switch to just run daywall, instead of re-checking the images and analyzing new ones on every run. But the big thing I'd overlooked is my screensaver. I use a photo slideshow screensaver. So the problem I'd been having with random wallpapers suddenly hit me in the face with my screensaver images as well. So I hacked together a solution for that as well: daywall_for_xscreensaver.sh. It was a little tougher than anticipated. Xscreensaver (and presumably its distro-specific forks as well) allow you to specify a directory of images to use for the screensaver. It'll check the filenames of all those images when it first starts. And then never check those filenames again. So in order to dynamically change the wallpapers while xscreensaver is running, we have to specify a directory (it's hardcoded in the script) and copy our files over into the same file names. The script not only calls daywall a number of times (9 by default ), but it also makes sure that it pulls nine distinct and separate files. You can find daywall and daywall_for_xscreensaver.sh at GitHub, GitLab, or my personal git repository. Photo by Zhyar Ibrahim on Unsplash https://ideatrash.net/2024/09/getting-xscreensaver-slideshows-to-also-change-brightness-with-the-time-of-day.html?feed_id=339&_unique_id=66dee69c9ec5d
5 notes · View notes
catboybrain · 1 year ago
Text
sniffles sadly. every day im so sad that fnaf didnt go with placing vanny into aftons role.... god forbid women do anything ! ! !
#just saw gtlive finish the first ending n like. urgh#maybe if i liked eclipse more i wouldnt mind how prevalent they r but woof man#like i get it its charlie and evil baby or whatever in the same body but come onnnnn#that and the candy cadet stories just bashing the same kid going into woods framework into the ground#i miss when it was like. this dude sewed 5 kittens together! this lady melted 7 keys! stuff like that yk that was different and scarier#i do rlly think the series is going toward this like polished marketable thing instead of the grimy sludge i liked .... </3 and the AI stuf#is sooooo boring like fuuuuck its so boring. i wouldnt mind if its charliebots bc at least theyre interesting !!!!#but mimic as the new villian? bro. dude. thats so boring come on... afton was interesting bc he was fucked up severly#and robots r just like. theyre just robots dude its not even scary its just a thing being programmed smh#without the afton behind it its kinda just ..... bleh#honestly i wish they would cap the story? like make vanny take aftons role; do some shit; end it in a tragic but cathartic way#and then if they want to make more games do either other families in universe (like fazbear frights) or prequels/ world building shit like#something set in circus babys pizza world or w/e .i mean you could argue its about cassie now but if her dad is bonnie bro we're still stuc#in the afton central place. and i dont like that hteyre moving on without wrapping up the 102938120 loose ends they already made URGH ! !#is it too much to ask for a fnaf game thats crusty round the edges and really metaphorical for theorists to dig into but logical enough it#can be solved and also creates a good plotline . yeah i guess hell will freeze over before that#d.txt#sorry im sooooo normal about fnaf <- is abnormal. fuhnaffs theories r GREAT thoguh i love that guy he makes me happy about the franchise :o
8 notes · View notes