← Home ← Back to /g/

Thread 106337749

30 posts 6 images /g/
Anonymous No.106337749 >>106338024 >>106338030 >>106338306 >>106338334 >>106339187 >>106339252 >>106339435 >>106339795 >>106341935 >>106341958 >>106342005
what was the last script you used?
Anonymous No.106337980 >>106338004
3 lines of CSS to get rid of the shitty font with Claude.
Anonymous No.106338004
>>106337980
That's not really a script thobeit so i don't actually know.
Anonymous No.106338024
>>106337749 (OP)
spam_racisms_on_4chan.py.
Anonymous No.106338030
>>106337749 (OP)
qrd.ps1
Anonymous No.106338189
gallery-dl
Anonymous No.106338306
>>106337749 (OP)
Script that automated the creation of a network in Meraki and fully configured it, by only inputting the serial numbers and our internal sitecode
Anonymous No.106338334
>>106337749 (OP)
small python script using pyautogui to automate a tedious repeating task in a game i was playing
Anonymous No.106339187
>>106337749 (OP)
It is ugly, but it works to quickly switch from 1 to 2 monitors, and of course I have the opposite functionaltiy.
dualscreen.sh
#!/bin/bash
pkill xmobar
sed -i -e 's: xmproc :-- xmproc1 :g' ~/.xmonad/xmonad.hs
sed -i -e 's:-- xmproc2 : xmproc :g' -e 's:-- xmobar2 : xmobar2 :g' ~/.xmonad/xmonad.hs
xrandr --output HDMI-0 --mode 1920x1080 --rate 60 --left-of DP-0 --output DP-0 --mode 1920x1080 --rate 120
xmonad --restart
singlescreen.sh
#!/bin/bash
pkill xmobar
sed -i -e 's: xmproc :-- xmproc2 :g' -e 's: xmobar2 :-- xmobar2 :g' ~/.xmonad/xmonad.hs
sed -i -e 's:-- xmproc1 : xmproc :g' ~/.xmonad/xmonad.hs
xrandr --output HDMI-0 --off
xmonad --restart
$ grep 'screen.sh' .bash_aliases
alias dlscrn='~/bin/dualscreen.sh'
alias snglscrn='~/bin/singlescreen.sh'
Anonymous No.106339252 >>106339284
>>106337749 (OP)
find . -type f -name "*.jpg" -print0 | xargs -0 -r -I{} -P`nproc` /bin/sh -c 'f="{}";echo "Converting $f";cjxl -d 0 -e 9 "${f}" "${f%.*}.jxl" && rm "$f"'
Anonymous No.106339284 >>106339365
>>106339252
>&& rm "$f"
No fucks were given, wow.
Anonymous No.106339365 >>106339407
>>106339284
I should def add some safe guards other than double ampersands but so far it hasn't resulted in data loss so meh
Anonymous No.106339407
>>106339365
I learned something from it, so thank you. The ending was exciting. I am sure you tested it to safe. I was commenting more on the fact that it was definitely not a back up or archiving solution. ;3
Anonymous No.106339435 >>106339526
>>106337749 (OP)
#!/usr/bin/env bash

user_datadir="$HOME/.local/share/HyperSpec"
if ! [ -d $user_datadir ] ; then
echo "Failed to find directory: $user_datadir"
exit 1
else
exec xdg-open $user_datadir/Front/index.htm
fi

no I don't know bash well and I don't care to learn at the moment
Anonymous No.106339526 >>106339605
>>106339435
Is this you learning or using the referrence for COmmon Lisp?
Anonymous No.106339605 >>106339678
>>106339526
I've just finished reading through Practical Common Lisp, so a little bit of both (but mostly reference). Cool language by the way.
Anonymous No.106339678
>>106339605
>Cool language by the way.
That is due to it being able to be any language you want to be.
Anonymous No.106339795
>>106337749 (OP)
Not truly a script since it's embedded on my .bashrc, but I have mkcd that does mkdir -p $@ and then cd to the last arg. Can't be a standalone script because subshell cd.
Anonymous No.106339827 >>106339860
i wrote a userscript that triggers whenever I post something on 4chan to save the post number, thread number, and the board, so that one. literally in the same second as me posting this.
Anonymous No.106339860 >>106339909
>>106339827
What does that look like?
Anonymous No.106339872 >>106339900
>[Esc] turned into the spirit animal of autistics
cringe.mkv (420 GB, 3180x2160)
Anonymous No.106339900
>>106339872
I use pic related ;3
Anonymous No.106339909 >>106339941
>>106339860
it's like 4 lines lol
4chanX already has a callback for calling after a post is made. I just get the info from the event and save it to a cookie (which I periodically export and then consolidate into one json file)
Anonymous No.106339941 >>106339964
>>106339909
So it is a userscript/javascript?
Anonymous No.106339964
>>106339941
yes
Anonymous No.106340028
I press Ctrl T to bring up a notify script that displays the time
Anonymous No.106341935
>>106337749 (OP)
Convert from epub to pdf
Anonymous No.106341958
>>106337749 (OP)
webm.sh
Anonymous No.106341971
i use a volume script everyday.
Anonymous No.106342005
>>106337749 (OP)

it does not run without errors yet
dcraw -w -h *.NEF
mogrify -flatten -format jpg -sampling-factor 2x2 -quality 90 *.ppm
mkdir jpeg/
mv *.jpg jpeg/
fi