Skip to content

kaankoken/scripts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Run At Me

Scripts created for increasing productivity & help the devs.

Scripts

Check Sudo

The script checks whether the device has sudo command or not. If the command exists, it checks shell has sudo permission. Outputs:

  • Zero(0) means have sudo commands, but it does not have sudo powers/permissions on that terminal.
  • One(1) means have sudo commands, but it has sudo powers/permissions on that terminal.
  • Minus One(-1) means have no sudo commands.

How to use

sh check-sudo.sh
OR
bash check-sudo.sh

Create SH Binary

This script creates binary files of a given bash script to be run on Unix/Linux based machines.

Before run anything

  • Be sure to have this awesome tool called shc. You can access here.

    • For ubuntu or debian based OS:

      sudo add-apt-repository ppa:neurobin/ppa
      sudo apt-get update
      sudo apt-get install shc
    • For MacOS:

      brew install shc
  • After that, you are good to go.

How to use

sh create-sh-binary.sh -f create-sh-binary.sh
OR
sh create-sh-binary.sh -f create-sh-binary.sh -o my-binary
#Yes, can convert itself. :D

And then move your my-binary file to the usr/local/bin/ folder to run in your terminal. Just type

my-binary example-1 example-2

Remote Tunneling

The Script helps to tunneling using SocketXp for remote development or connecting to IoT devices.

Before run anything

  • You need to create an account on SocketXp.

  • Also, you need to follow to the steps to create an Authentication Token and connect to remote devices.

    • You can follow it here.
  • After that, you are good to go.

How to use

# You could pass your sudo password with the "echo"
echo 'sudoPassword' | sh remote-tunneling.sh -a your-auth-token -d device-id-to-connect -o local-port-to-opened -p host-port -u username for ssh

# If you already permitted to your terminal just run

sh remote-tunneling.sh -a your-auth-token -d device-id-to-connect -o local-port-to-opened -p host-port -u username-for-ssh
  • Alternatively, you could create a binary file using Create SH Binary to use it.
remote-tunneling -a your-auth-token -d device-id-to-connect -o local-port-to-opened -p host-port -u username-for-ssh

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages