#unix
1 messages · Page 48 of 1
yeah anyone??
though i will leave at this moment because i gotta do a video presentation for my research gtg
hey guys
I do yeah, big fan
bspwm is very underrated!
hello
i have a problem
when i boot up
it shows that Error: resume hibernate device “y” not found
Hey guys I tried using pyautogui in ubuntu 20.04 but this came up tried googling didnt work
has anyone used starship here?
for some reason my memory usage isnt showing up
it was showing till yesterday
this isnt working for some reason
nvm ik why
You are below 50%, aren’t you?
I have a script which toggles a setting depending if it's allready set or not. I have to save the current state, what's the best way to do that?
Currently I save a character to a file
You can use some flags
"save the current state"
You can use some flags
@weary fossil Can you elaborate?
"save the current state"
@opaque ginkgo I just need a bit I can flip to show which mode it is in
honestly the file approach is the best method i can think of
What is a good folder to save it? @opaque ginkgo
hey guys
I have a script that runs scrapy through CrawlerRunner
I recently added a cronjob to schedule the script, but the script didn't execute,
I checked the logs grep CRON /var/log/syslog and cron did execute it but idk what happened. I even made a bash script to activate the environment and run the script etc but no luck. If I run the bash script standalone then it works fine. What could be the problem?
bspwm is very underrated!
@lime whale
I do yeah, big fan
@tender crystal So do you use polybar with it ?
I recently added a cronjob to schedule the script, but the script didn't execute,
I checked the logsgrep CRON /var/log/syslogand cron did execute it but idk what happened. I even made a bash script to activate the environment and run the script etc but no luck. If I run the bash script standalone then it works fine. What could be the problem?
@sacred tulip use systemd instead
you can see the entire log for the service
and you'll be able to just directly see the fault it spits out
So do you use polybar with it ?
@shut tusk
I used to, but not anymore. Don't use anything as a bar atm. Might go back to using one at some point though
why the fuck my nvidia driver not working
I use arch btw. I hope that'll help to solve the problem
why the fuck my nvidia driver not working
@lapis radish I have heard drivers crashing or causing screen tears but never heard themnot working. What GPU do you have?
I think I may need to get a unix environment to get my program to work properly. What's the best way to get one? (free)
If you're on Windows, you can get WSL for free, there's also git bash
WSL: Windows subsystem for Linux
you can just open the Microsoft app store, look for "Ubuntu" and install it.
you need to enable the wsl feature first
brw-rw---- 1 root disk 8, 16 Kas 7 12:54 /dev/sdb```
Hi, I want to know what the difference is between these two device files
I have stm32f4 discovery board plugged in
```$lsusb
Bus 001 Device 008: ID 0483:374b STMicroelectronics ST-LINK/V2.1 (Nucleo-F103RB)```
one appears as a character device and the other as a block device. I expected a symbolic link for the other
need unix / ssh help with visual studio code in #help-cookie
hey so basically currently im getting this error with python 3.9
ERROR: Could not build wheels for multidict, yarl which use PEP 517 and cannot be installed directly```
so im tryna install python 3.8, which i did in fedora
how do i set it as my default interpreter?
hi guys
so when u mount another file system in ur current file system does it fucks up anything ?
It is supposed to make the root of the file system that you are mounting visible at the place you mounted it at.
Is there something more specific that you are worried about?
@frozen lodge
why does pythonanywhere bash not have sudo insatlled?
i cannot install it
when i type su - nothing happens
Didn't use python anywhere but maybe they don't want ppl to get root access
i was worried it would mount my other system
i think i misunderstood how mount works lol
thnx tho
i got what i wanted 😄
lol
thats great
@warped wing what are you trying to do?
i.e. why do u need sudo?
i wanna do ssh
me?
no haha czech
hmm it sud have sudo installed
ur prob in root then ?
no
ohh
oh lol they didn't mount ur proc 😄
lol
is proc the name of the file system that hes mouting to proc dir??
no so in linux all the info
about processes
are represented in a virtual file system
( i.e. a file system that is not real )
called proc
so ps
is trying to read it
to list the processes
ohh i see
but it is not mounted
but there isnt any virtual fs for proc mounted
yes
dont u need to set that up beforehand
like tell it to mount in the docker or compose image file ?
if hes using that ?
usually container systems mount the thing for you when
they create the container
I am guessing that there is a way to tell them not to do it
but totally up to the container creaters on whether they want to give u this ability or not
but it is definitely not needed
ohh i need to learn about containerize system lol
yes they are interesting
I have built one
I can recommend a tutorial
if u r interested
they are actually not that
hard to build
i did make heaps for writing docker image file
i meant like how the whole system works
like the in depth
yes sir
i.e. a container system like docker
exactly
( what I did )
haha its all good
thats really awesome tho
hopefully i can make one something like that
haha
hes gone tho lol
ye def im reading some unix and linx programming books atm. hope it turns out well...lets be optimisitic about it lol. Anyways imma get back to me ricing so cheers m8 have a nice one
oh sweet thnx heaps for the link 😄
Guys, I'm having issues with systemd, can you help ?
Basically, I'd like the bot to nicely start on boot.
The issue is that Lavalink takes so much time to start that the bot tries to connect before it is ready.
What I'd like is to have the bot start only after Lavalink is ready. How can I do that ?
@snow thorn i mean these are two seperate services right? just set the bot to require the lavalink service
Look at After/Before/Requires etc
@main olive The issue is that After / Requires make it so that the bot starts after the process has started. But Lavalink isn't ready right upon startup. On my last boot, it took around 40 seconds to initialize (plus around 60 seconds of Java initialisation). I already put an After, but the bot tries to connect before Lavalink is ready, thus creating issues
hmmmm
i mean on a simple way you could just delay the start of the bot with a timer but thats hacky even if it would work
Yeah, I'd like for once to do things properly
is there some command or something you can do to check that lavalink is ready?
Actually, I could use a hacky way to do that, by greping the log messages, yeah
stack overflow doesnt even have a good solution 😐
Something like journalctl -b --unit lavalink | grep "Started Launcher in"
If there is such a log message, it means that Lavalink is ready
i guess this is the official best way but it seems so intense to do
create sockets and stuff
The issue is that to implement that I'd have (if I understand well) to recompile a custom version of Lavalink so that it uses the socket, but I don't know Java, so I basically would have to learn Java just for that
Seems a bit intense yeah
But is there a way to tell it like to wait until the log message is logged ?
@main olive Would something like that work ?
while ![/bin/journalctl -b --unit lavalink | /bin/grep -q "Started Launcher in"]
do
/bin/sleep 2
done
/usr/bin/python3 -m "Chaotic Bot.py"
Saving that in a .sh, and running it in StartExec ?
maybe, im bad at greps and journals
if we assume your while condition is correct then yea
i do a decent amount of service > runs startup sh > runs actual program
It theorically should be true, because grep with -q just returns exit code, which is 0 for success and non-zero for failure, and if I understand well exit code 0 is interpreted as true, non-zero as false
And, to run it, I'd just put ExecStart=/home/waylander/bot/startup.sh ?
ya
Ah shit, I tried to simulate it in an if, doesn't go well
grep thinks that the ] is a directory I'm passing it
Conditional -b operator found... I think Imma try the var
Well, I'm still having issues with grep
Wait, I think I fixed that with a pipe
AAaaaaaaaaah
-bash: 
Would this be a good way to wait until a program is listening on port 2333 to start a program ?
This file would be started by systemd
#!/bin/sh
while ! /bin/ss -H -t -l -n sport = :2333 | /bin/grep -q "^LISTEN.*:2333";
do /bin/sleep 1;
done
/usr/bin/python3 -m "Chaotic Bot.py"
Hey could someone help me downloading Xcode cause I cant seem to find it
Does it work @snow thorn ?
I really dont like spaces in filenames though
that's a windows thing 😛
Honestly, I haven't tried yet because I reboot my server like every two months
I realised there was an issue on last reboot, so I'm trying to make it so that it won't happen again
well, just check for another port
and run something on that
and -m and a filename
doesnt seem right
or am i missing something?
Why ? That's how I'm currently running the file, and it works very well
My question is "is that a good solution, and if not, what would be a better solution" ?
Because it should work fine, at least theorically
Dont know how often I heard that
and it turned out to be wrong
All I can say is, that I dont have a better solution
I mean, the snippet of code does run well
it seems to be ok, but i'd definitely test it
Well, I tested it, didn't enter the loop obviously
so start that with another unused port
than start some application on that port
and see if it executes something after
an echo is enough
Guess imma try that
But later, I gotta go rn. Thanks.
I guess the real test won't come for 2 months, but it's a great idea to test with an unused port. Imma try that
https://youtu.be/Ldbe1rIgbxg?t=602 10:02-10:17
I have a microcontroller and I am doing something with USART to communicate. The guy on the video uses arduino IDE to see the communication, I however don't have the arduino software so I thought a simple tail -f /dev/ttyUSB0 would work, but it didn't work. I think it showed up as ttyACM0 instead, for some reason. It outputs nothing. Is it an expected result I don't know. I am not wondering why it doesn't output anything. What I am asking is if my approach is correct.
1- This guy on the video uses almost the same microcontroller as I am using (there is definitely some difference) why does it appear as ttyACM0?
2- Is my approach correct? tail -f /dev/ttyACM0 if not pls explain
It is more of a unix question than a microcontroller, so I decided to post it here
Silly Question: Is there an IDE for the MINIX 3 operating system including the
? 
HI!
how can I pipe output of one command to another export command
echo 'bar' | xargs -I export FOO='{}'
something like this?
export FOO=$(echo 'bar')
hello everyone
i have a problem with termite
cursor_shape variable does not make the cursor shape change in the terminal
i opened and reloaded termite terminals but no luck
😦
How do I update python on ubuntu? It comes with 3.8.5, and I want to upgrade to 3.9. I'm not sure how to do this because apt uses python, and 3.9 comes in a separate package.
i would install in home directory under .local and add it to path.
https://nullprogram.com/blog/2017/06/19/ if you wanna do that
oh ubuntu has a 3.9 packaged? Then why not just update? o.0 Idk.
wdym
The commands still link to the 3.8.5 binaries
idk. update-alternatives or something? 😄
Ok, thanks I'll look into that
@thorny vine don't play around with that ubuntu standard installation. It might break your terminal
A way better way to do that is to use virtual environments
these are also used to handle dependencies over different projects
Thank you guys @main olive @opaque ginkgo
Hey could someone help me with Xcode cause I can't downlaod it
Hi ! I want to start with unix scripting.....tons of resources.....can anyone recommend their personal favorite?
Hello 👋. I don't know if this is the right channel, but I'm getting some errors when importing tkinter:
They're just warnings so the program runs perfectly, but I think I should not be getting those errors. The terminal says that there are "100 problems". Why I'm getting this errors? I'm using VScode
beacuse you're using a wildcard import
which polluts the global namespace with a lot of random modules/functions
causing pylint to complain that you're not using most of them
just do import tkinter as tk if you want a shorthand
@strange sinew
No more errors. Thank you @opaque ginkgo
hey hope your fine guys i have probelem with running anaconda on my manjaro, any one up for help?
whats the error
discord.errors.HTTPException: 400 Bad Request (error code: 40032): Target user is not connected to voice.
why am i getting this error
Because the target user is not connected to voice I guess
what better debian or ubuntu?
depends
ubuntu is supposedly better for beginners
but debian is the upstream
and gives you more flexibility
I use debian, find it a smoother experience
Does debian have older packages than ubuntu? Im using fedora.
Yeah it does
What does flexibility mean here?
I use fedora bcs easy installs, recent software and it works. If new version every 6 months isnt a bother consider it too mb. Im a newish user too. (end of blatant advertisement) rpm fusion is a must though, and support works well on freenode irc channel.
debian stable is really stable but packages are kinda old(I think 2 yr release?)
Debian testing gets you latest packages after 14 days(iirc) in unstable
ubuntu does 6 mo release
personally I've been running debian testing through wsl for a bout a year and I've only hit 2 bugs
One was a wsl issue and the other was a warning
Debian stable right now is pretty fresh
Released a few months ago and has plenty of backports
But I personally use testing on my home machine as well
I use stable on servers
and i've installed and used (for a bit) gentoo, but that was 10 years ago or so, so it doesn't count. Been windows user for a long time, and I'm a new linux-user now 😄
ever used rasspberry pi?
How does everyone manage python versions and environment stuff?
@chrome cosmos Yup. Why do you ask? I have 2 running right now on my network.
just install everything into global
It's been a while since I used Python as my daily language and now there are things like pyenv plus docker.
err maybe someone can help in here
I'm trying to install eventlet and i got a compiler error
it's really large
i searched around and it seems to be a system issue, not a library issue
I've experienced them before as well, it had to do with xcode not working properly after upgrading my os
I'm on a mac btw
however this time around im not sure what the solve is, it's having an issue with greenlet
but I've already updated the xcode command line tool, because as I mentioned I had this issue before with another library
does eventlet support macos?
not sure
eventlet is not platform specific but
its "hubs" can be
the default hub is only for linux
but yeah eventlet is compatible
idk might be a brew issue
yeah it's a build script issue
it's not picking up headers
something with cpython
does eventlet support macos?
@opaque ginkgo i think its a build script issue
the error is really common, among other packages
from what ive googled it's not recognizing a developer header. But idk what that stuff is
and it looks like a brew/mac/cpython issue
like it's not compiling correctly
im trying to edit my bash_profile, is that in my home directory?
Yes, under ~/.bash_profile path (https://askubuntu.com/a/29241/471812)
(~ means home dir)
if your trying to find it using a graphical file manager, they hide filenames that start with .
by default
Hello , Im using nsjail to host one of my services , but the thing is , I want nsjail to make the service run with the libc of another version , so for that I created lib , lib64 folders , and inside the lib/x86_64-linux-gnu , I had the libc I wished to use stored as libc.so.6 , and the dynamic loader was put under the folder lib64 with the name ld-linux-x86-64.so.2. Then, in the nsjail script , I had mounted the lib folders which I had created , but when I host the service , I see that its still using the libc of the server on which it's running
is there something Im missing ?
I dont think we need to preload the libc in nsjail as it creates a pseudo file system if Im not wrong
can someone give me an insight into this?
Hey how would i set env variables in mac?
zsh btw
http://zsh.sourceforge.net/Intro/intro_3.html It says .zshenv, but i'd still put it in my .zshrc, because thats where i put everything -.-'
<html>
<head>
<title>Hello!</title>
</head>
<body>
<h1>Hello World!</h1>
</body>
</html>
how do i build a webserver which shows this
import sys
import socket
import os
def main():
try:
x=open(sys.argv[1],"r")
my_lines=x.readlines()
if len(my_lines)!=4:
print('Missing Field From Configuration File')
x.close()
except IndexError:
exit('Missing Configuration Argument')
except FileNotFoundError:
exit('Unable To Load Configuration File')
for line in my_lines:
line=line.strip()
key=line.split("=")[0]
value=line.split("=")[1]
if key=="staticfiles":
Staticfile=value
elif key=="cgibin":
cgibin=value
elif key=="port":
port=int(value)
else:
configure=value
my_socket=socket.socket(socket.AF_INET,socket.SOCK_STREAM)
my_socket.bind(("localhost",9000))
my_socket.listen(10)
while(1):
conn,addr=my_socket.accept()
print(conn)
try:
print("vasu")
data=conn.recv(1024).decode()
if not data:
break
my_list=data.split('\n')
if (len(my_list) > 0):
print(my_list[0])
send_data="HTTP/1.1 200 OK\r\n"
send_data+="Content-Type: text/html; charset-utf-8\r\n"
send_data+="\r\n"
send_data+="<html><body>Hello World<body><html>\r\n\r\n"
conn.sendall(data.encode())
conn.shutdown(SHUT_WR)
conn.close()
except Exception:
pass
my_socket.close()
if name == 'main':
main()
this is what I have come up with and it goes in an infinte loop
@main olive wrong channel
how do you provide a unix executable file in macos sudo permissions by default?
basically its like giving git sudo permissions all the time (even though it doesn't need it but thats just an example lol)
hello every one
does any ene know how to look for changes and also put new info on the dbus netwok
does any one know how to use dbus please pm me
@thorny sage make it suid?
or add it to /etc/sudoers as nopasswd using visudo
though keep in mind that both of these are quite dangerous if used incorrectly
i need help installing bs4
and i think im doing it all wrong
can i show some pictures of my attempts in this chat?
if you got pip it should be easy
@opaque ginkgo thank you so much i'll look into it
@main olive please don't post rmrfs even as a joke
ok
and \ means root dict
xd
so delete everything in the root dict
ive done that but it says that its already installed inside a directory that starts with a dot (./Users/me/Library/Python/3.8/lib/packages/....)
idk why but any pip install commands i try in pycharm gives me a typo error. and ik im writing the right commands
hol up
typo?
are
are you running pip install
in a .py file
@main olive
also check that pycharm is set to the right interpreter
not the system one
Has anyone managed to get python3 installed and working on an M1 machine yet? I suspect it'd require a recompile...
did they stop preloading Python?
no im running it in the console in pycharm
and how do i check if its the right interpretor
lol
How can i connect my linux (ubuntu) machine through ssh over the Internet without port forwarding.
Is there an easy hack around this.
ngrok?
@opaque ginkgo is it available for Linux
yes
Also is there's a way to replace default random ngrok url with custom domain name
not unless you pay
Ok
what would you expect that to do?
@opaque ginkgo i see that chmod is used for that right however, i'm not sure what explicit permissions i need to set for it to run as admin (sudo permissions) all the time 0-o
what is the delete command in mac?
same, rm
If I wanna use both Windows and Linux, should I use WSL2 or a KVM Switch Software such as Symless Synergy.
A VM doesn't have the capacity and I heard that it becomes quiet troublesome with dual-boot.
@thorny sage chmod only lets others run it
but not as root
to let them run as root
you either need to turn on suid(chmod +s iirc)
or add to /etc/sudoers with nopasswd
aah alright thank you
bro how u even install python on mac
ok im confused
i downloaded python 3.6.10 cause apparently u can install discord.py like that cause idk how to install discord.py but i cant install python in the 1st place
@AgentSully use pyenv if you need various python versions it's an easy env mgmt tool for python, brew install pyenv then pyenv install <python_version> pyenv works on most platforms and makes management a breeze. Alternatively you can bareback it with brew install python@3.6 but id recommend pyenv.
he left
Patience is a virtue 🙂
haha 😂
hey guys, I'm a noob pentester. Each time I got a reverse shell I have to run python -c 'import pty; pty.spawn("/bin/bash");' in order to get a fully interactive shell (I can't run sudo or anything like that with the initial reverse shell because it errors "must be run from a terminal"). Why am I not getting a fully interactive bash shell in the first place?
spawning bash doesn't mean spawning a tty by default
since the shell is unrelated to what the terminal does
thank you
whats a great software to program on thats free for python mac and i anybody can dm me to set it up if its hard that would be much apperciated
Visual studio code or pycharm, if you're starting out maybe try MU
hi
Hello , Im facing the issue of merge conflicts in gitlab , is there some way to resolve it from terminal or do I have to re-fork the original repo again? , whenever I try to pull changes from the original repo , it shows everything is up to date , but then , when I send a pull request , the repo admin says that my merge has conflicts
you don't need to re-fork or re-clone the repo but you need to understand - https://www.atlassian.com/git/tutorials/using-branches/merge-conflicts
Merge conflicts happen to everyone! Learn how to efficiently identify and resolve Git merge conflicts using various commands, methods, and tools.
If crontab syntax is: * * * * * <command>, how does the following cron job work?
* * * * * cd /home/ubuntu/flasky && venv/bin/flask scheduled
It seems to be saying, navigate to the flasky directory and if that works, run flask script from venv/bin.
But it also gives another command scheduled, how can <command> take two arguments that aren't separated by a ;?
Another example of multiple arguments to <command> parameter:
17 * * * * root cd / && run-parts --report /etc/cron.hourly
You can create script that executes several lines at one call
Thanks @amber garnet . I don't understand though.
Make some script, for example /usr/local/bin/my-cronjob.sh with content
#!/usr/bin/env sh
cd /home/ubuntu/flasky
venv/bin/flask sheduled
Then in crontab run it by * * * * * /usr/local/bin/my-cronjob.sh
Remember to add executable premission using chmod +x
Oh I see. Thanks. Problem solved.
Hey I have a question. I have a py script that's running as root. I want it to launch a different py script as a specific user (still with elevated privileged) from within this program. Any suggestions how to go about this?
Ty I'll try that
is there a way so if i do Ctrl C it doesn’t break out of the file
hello
hi
is the file python or shell?
@main olive
heres how to capture ctrl+c in bash: https://stackpointer.io/script/how-to-catch-ctrl-c-in-shell-script/248/
in a python script, use the signal module, https://docs.python.org/3/library/signal.html, signal.signal(signal.SIGINT, signal_handler)
@main olive better solution is to catch KeyboardInterrupt
why is this apt's default behavior
root@0a8aa31ad934:/# apt install python3.6
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'python3.6-kdtree-dbg' for regex 'python3.6'
Note, selecting 'python3.6-cups' for regex 'python3.6'
Note, selecting 'python3.6-ldap' for regex 'python3.6'
Note, selecting 'python3.6-cairo' for regex 'python3.6'
Note, selecting 'python3.6-sfml' for regex 'python3.6'
Note, selecting 'python3.6-pymad-dbg' for regex 'python3.6'
Note, selecting 'python3.6-nss' for regex 'python3.6'
Note, selecting 'python3.6-pypcap' for regex 'python3.6'
Note, selecting 'python3.6-2to3' for regex 'python3.6'
Note, selecting 'python3.6-urwid' for regex 'python3.6'
spent half an hour trying to figure out why i had a bunch of random packages that I've never installed in my life installed
and its because apt decided to regex match a python3.6 install back in march
LMAO
Hi, i receive this error on exec of the command (uiserver):<user>:~$ apt install sudo
W: Unable to read /etc/apt/apt.conf.d/ - DirectoryExists (13: Permission denied)
W: Unable to read /etc/apt/sources.list.d/ - DirectoryExists (13: Permission denied)
W: Unable to read /etc/apt/sources.list - RealFileExists (13: Permission denied)
E: Could not open lock file /var/lib/dpkg/lock-frontend - open (13: Permission denied)
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), are you root?
can someone help me please?
are you trying to install sudo?
Weeelll, you need to run it with superuser rights, so either you already have sudo and you can sudo the apt command, or you escalate your shell to root using su - and retype the command (without sudo at the beginning) @somber nebula
Yes, because when i exec the command (venv) (uiserver):<user>:~$ sudo i receive
-bash: sudo: command not found
sudo is already installed. trying putting sudo in front of the command
@somber nebula try this link, and see if this helps. https://unix.stackexchange.com/questions/471118/sudo-not-found-and-cant-be-installed?rq=1
Thanks
help please? #discord-bots message
Hello there, is it possible to run python srcript as shell command? I am wrote my "hello, world" could i just move it to bin directory, and then just type "name.py" in terminal?
or it possible, only if i create a bash script that will open python file ?
why does WSL2 do this?
idt that's wsl's fault
@opaque ginkgo so it's created for linux but since wsl 2 is windows the character's aren't seen correctly?
That's interesting
When copy pasting this windows converted the line endings, most probably
@opaque ginkgo thanks! works perfectly
How to rename a pygame.py inside a linux system
I’m getting this error
pygame.init() attributeerror: module 'pygame' has no attribute 'init’
yeah but it's not wsl's fault
that will happen to any crlf file
even in native linux
What's Unix?
A family of related operating systems
the 3 most common operating systems on a personal computer are MS Windows, Mac OS X, and Linux - both OS X and Linux are Unix derivatives.
Thanks
Hi
hi
Hello 🙂
This is how u install homebrew on mac right(zsh not bash)
-c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
@solemn snow oh no, another "pipe curl to bash" installer
i haven't done it yet
so?
the installation shouldn't depend on what your main shell is
As long as you run the installer with bash
ok so i run that script?
Does this leave plain text credentials in the git repo?
#!/bin/bash
declare -rg TRUE=0
declare -rg FALSE=1
[[ -f ".env" ]] && source .env || { echo "Missing .env file. Exitting."; exit $FALSE; }
DEST=$(realpath $1)
[[ -d $DEST ]] && cd $DEST || { echo "$DEST does not exist"; exit $FALSE; }
PROJECT=$(basename $DEST)
ENDPOINT="https://$GITUSER:$GITPASS@$DOMAIN/$GITUSER/$PROJECT.git"
[[ $# -lt 2 ]] && { echo "Supply the script with './script.sh " }
[[ $# -gt 1 ]] && { COMMIT="$2"; } || { read -p 'Enter Commit Message Plox: >>> ' COMMIT; }
git add *
git commit -m "$COMMIT"
git push "$ENDPOINT" master
I have not tested this yet because im not sure if supplying secrets from .env is secure passing them to git, even in this way. So I wanted to ask and might just delete this.
Im not the best at shell script and i know it probably needs some fixes.
I didnt finish the [[ $# -lt 2 ]] && { echo "Supply the script with './script.sh " } line
how do I uninstall JetBrains ToolBox?
Idk
Well, how did you installed it?
Windows control panel
to be honest, I don't remember. oh wait. I think I downloaded it to get PyCharmEdu IDE. Is there a way to remove toolbox without losing pycharm?
Im on Ubuntu 20.04
And also, how do I change what boots on startup? Sorry, im new to this OS
Click on the Ubuntu Software icon in the Activities toolbar; this will open the Ubuntu Software manager through which you can search for, install and uninstall software from your computer. From the list of applications, look up for the one you want to uninstall and then click the Remove button against it.
I tried that, and my installed tab doesn't show up anything but a blank screen, and toolbox nor JetBrains yields any search research results for toolbox
I was able to find and delete all the folders for ToolBox and deleted them, and now am restarting my laptop, but im not sure if that actually un-installed it or not
Ok it did. Awesome. Tyvm!
does anyone here know about qtile?
with what
map <leader>h <Ctrl>w h
map <leader>j <Ctrl>w j
map <leader>k <Ctrl>w k
map <leader>l <Ctrl>w l
In my .vimrc I'm trying to remap ctrl+w h/j/k/l to my leader key followed by and h/j/k/l I tried ticking them toget like this <Ctrl>wh and <Ctrl>wj and so on but it didn't work
Nevermind I figured it out
Yeah, got it. Thanks.
Hello, how do i search in Python documentation correct ? I mean, i am trying to find everything about read(), i start to searc at https://www.python.org/search/?q=read()&submit= and it just give a million links
well, read() isn't one thing, it's a method of a bunch of different classes. A ctrl-f for "read()" here lists them all: https://docs.python.org/3/genindex-R.html
that's the "index" in the top right, next to the search box.
@summer trail thanks 🙂
do i understood correct, that text file will close automatically, as soon as be readed
"(If a file descriptor is given, it is closed when the returned I/O object is closed, unless closefd is set to False.)"
using a closefd=TRUE
text = open(file_adress, "r",closefd=True)
correct ?
of no, found answer ready
if closefd=True means file_adress(text = open(file_adress, "r",closefd=True)) is not a file name
closefd is used for controlling whether or not calling close() on the file actually calls os.close on the underlying operating system file handle.
How to start a background program in linux?
Suffix the command with an ampersand
Although it can get more complicated
This is a good read
thanks
I recently switched to ubuntu from windows and have liked it a lot. however now i discovered the different de's and am debating with two of the popular de's (the default gnome and kde plasma). did anyone switch from the default gnome that came with ubuntu 20.04 to something like kubuntu or another flavor of ubuntu?
you should be able to try all of it on the base ubuntu by installing the packages and switch the window managers
i tried that one time, i installed kde and it messed up my whole gnome, i couldn't switch back
which de do u use on ubuntu @left mulch
none cause no ubuntu 🙂
oh lol windows then?
dont make much use of linux as a desktop system
do use debian quite a lot to build linux related stuff tho
but do prefer bsd overall
but tonight osx gives me headaches cause of numpy, scipy, blas, lapack and assorted issues and when i got it all working portaudio jumped at me like not being happy with the developer version i am running
so gonna give vmware a spin and put another debian on it 😉
is there a way to sync my vscode with my dropbox?
Put content in Dropbox dir?
You can create symlinks too but idk how Dropbox handles that
I'm newish to processes and stuff if i use ps -ef how do i find the command that spawns process
specifically my bash process
thanks
it's bit cumbersome using ps but can show the parent process id
i'd probably go for sysdig on linux.. or use python 🙂
aight thanks
p = psutil.Process(7055)
parent_pid = p.ppid()
👍
Helloo so I'm trying to learn linux and I made a main folder and 3 subfolders via mkdir I then made a txt file in Folder1 and i'm trying to copy it and transfer the copy to Folder2 but
cp test1.txt Folder2 just creates a file named Folder2 can someone help
it depends on the direcory in which you are
if you are in Folder1 you need cp test1.txt ../Folder2
if you are in the directory over Folder1 you need cp Folder1/text1.txt Folder2
when i tried this one it said too many arguments
.. stays for one directory up
np 🙂
is this where i can ask about using linux commands with python?
Any mac users here?
yep i guess
what is your question?
im a noob so i only use linux commands to do simple stuff
Sorry about that lols
So I found this image on unixporn. Can something like this be replicated on a mac? Like the tiling manager and all? Sorry I know it's off topic
Not sure about removing title bars, but tiling is possible
I don’t have a Mac so idk the name, but iirc there are applications you can install to enable auto tiling
the tiling yea
also this https://karabiner-elements.pqrs.org/
it's all brewed and ready to be keged
there are various approaches and i did probably try most but this is what i kept sticking with
typed python2 in finder. uhh deleted everything. and iii think its okay..?
someone in #python-discussion did this
don't personally use mac, so how bad is it and how can they fix it?
@main olive
i hope this is a good place to ask questions about uinput.
I'm trying to do absolute movement using python-uinput and found on an SO page that you have to set the range of the uinput.ABS_X and uinput.ABS_Y by adding a tuple to it.
I figured that the screen coordinates are where I must get those numbers from, and I did so by using xdotool
It doesn't quite work?
uinput.ABS_X + (1366, 2805, 0, 0),
uinput.ABS_Y + (0, 899, 0, 0),```
is what I'm using to move the mouse across my second monitor
it's placed weirdly
Ok I just figured it out
It uses the complete screen space no matter what numbers you put
So putting the top-left or bottom-right of the monitor wasn't bounding the area to that monitor
I ended up using the whole screenspace in the numbers and it works properly
And from that I can map a specific "area" on the screen corresponding to my monitor and work from coordinates relative to that area.
Does anyone here know how I'd go about doing a regular expression that searches for multiple unique values? For example lets say I want to match only lines that have even digits in them, I could just do [02468].*[02468].*[02468] (because its fine if there is whitespace between them)
but what if I wanted to match lines with 3 digits in them, where all 3 are unique?
So match 24jbs0 but not 22jbs0
regex matching groups and lookaheads, I imagine you'll get it done
Hi All,
I am not a programmer and started learning bash scripting. Now i want to advance to next level but cant find good tutorials. Most of the tutorials i found are for beginners such as discussing arrays..etc which i am bored of. I want to get into tool development and become an expert. Appreciate if anyone can suggest live online or ondemand training. Thanks in Advance.
Me too
tool development? I don't think bash scripting is what you are looking for
I've seen someone try to split a dataset using a bash script on doing his machine learning project. Lol
It's kinda funny; https://opensource.com/article/20/11/machine-learning-bash
Machine learning is a powerful computing capability for predicting or forecasting things that conventional algorithms find challenging. The machine learning journey begins with collecting and preparing data—a lot of it—then it builds mathematical models based on that data. While multiple tools can be used for these tasks, I like to use the shell...
Hi
does anyone here use qtile
Any idea how to create an api endpoint to stream server logs?
I searched and got pyinotify, is that the way to go?
lol yeah same
how far along is temple os from being an actual OS with a package manager
Simple tools , not full fledge and for automation tasks
is this channel just for unix stuff related to python
or can we talk about stuff like WMs
You catch a lot of random unix talk here... but the channel description does emphasise python on unix or unix-like systems. Are WMs window managers?
The name 😮
Lol
Surely gives me some knowledge on how to go about with maths
in the modern day
I’m just a high school student 😭
ah
um
ok
you a tutor?
🙂
No
It’s a yt vid
gotchu
Anyway
I thought that was a title to motivate yourself haha
I use arch
It is
Anyway
I want a nice wm
But dwm and i3 don’t really suit me
And awesome
Blackbox?
neverheard of it
anyone know how to fix this zsh: command not found: pip
try pip3
try this https://larbs.xyz/
it will look like this
https://larbs.xyz/pix/desktops/pic-full-200720-1137-54.png
checkout lukesmith on youtube for more of his build of dwm
has anyone done assembly programming and use avr studio before?
I don't think such people exist. What even is avr studio?
@dusty goblet I've done assembly, don't think I've used that tool though, gcc-avr iirc
sorry its been too long since I studied that stuff, xor and bit shift right, but I cannot remember the details, theres a plethora of cleverness involved there that i'm not smart enough for
Hi guys
I downloaded the freebsd source and i wanna make change to some files after that i wanna create an Installation ISO image from edited source
How can I create the ISO for installation with my edited files? or in linux not just freeBSD
Hi guys do you know how to select file like this "-6Pj64zANx8sddefault.jpg"
When i try to move file, its always invalid option
How to make it work even when I'm shutting down pc if the session is about to end?
its putty' ssh connection
@main olive Use GNU screen to run it :
Install it with sudo apt-get install screen. Then, start a new screen session with screen, launch your bot inside it, then do Ctrl-A d to detach from it once the bot is launched. You'll then be able to close your ssh connection, and still have the bot run.
Adding an & at the end of the command also works
🤔 So I can launch multiple processes with screen?
Sounds cool
btw how to shut down screens?
kill the process?
cuz I somehow launched 2 screens
yep maybe I should try
tmux >>>> screen
ctrl-a k while in the screen
I suggest you to press ctrl-a ? while in a screen to see the commands
I know it's nice but I can't tmux lol
Just loop it.
Yeah i did that
yo does anyone have any experience with zsh scripting?
I have literally zero experience other than a few custom zsh aliases
but im trying to script a function to open a link
so far no success
#! /bin/zsh
function openLink {
link = open -a Safari: "${link}"
}
openLink https://www.apple.com
This is my code. The only question I had is how do I make this dynamic? So far its just tells me the tags I can put on after open. I just want to be able to put in any link and have it open it for me
Also I am very sorry if this is the wrong channel and I apologize in advance if thats the case. Thanks for reading this! Hope you have an amazing day.
nvm fixed it
Hi, just a quick question. How can i output to multiple terminals? I want something like this example ```python
terminal_1 = ...
terminal_2 = ...
print("First hello") # output to terminal 1
print("Second hello") # output to terminal 2
In my specific case, i want 2 terminal (cmd), in the first one i want to output what the program do, and in the second one i want just only print some data that the program is processing.
Sorry, but I red your message ahah😅 😅
Yes, ok, it says me /dev/ttys000
And second one is /dev/ttys001
How can i tell python output something in 000 and something in 001
hey there. was curious if someone could give me a quick python lesson or point me to resources that can give me more information
im using a gcp server to run through a couple different CSV files and output 3 new CSVs
1 CSV has about 3 million lines, and the other two have like 3 and 6 resepectively (basically i'm doing some nested loops to create combinations of all 3 CSVs and output them to 3 new CSVs of 9M - 75M lines each)
the GCP server has 32 cores but i notice that when i run the script my CPU utilization maxes out at about 1.7 - 2.2%
basically im curious if i can learn more about what python is doing under the hood that caps the CPU utilization as opposed to trying to use more available CPU to write to my files faster
unless maybe it's just the way i wrote my program, meaning the way i'm looping / writing will only go so fast?
can i ask you which drive do you use, do you use an hdd or ssd?
Hey friends I installed the neovim in my ubuntu distro using wsl. It works fine and I set it up using this
https://github.com/ChristianChiarulli/nvim so that there are no errors in what I do.
However there is a problem with displaying the icons and in the lua files of this program....could some one help me to what to do....thanks
Look at the top right...the icon looks like question mark
These are the errors as you see
is lua installed?
Like if you mean sourcing and installing the packages yes I did that
but is there some other lua installation
is there a mac guy here
I want to convert my py file to .app but I don't have a mac, so can anyone help?
What kind of help do you need?
The pypi module py2app https://py2app.readthedocs.io/en/latest/index.html should be able to convert it for you, I don't know how you can distribute/host the app. I guess you're looking for a mac to test it?
You can also use systemd if you want the process to run in the background, on boot
Adding onto this, I’ve found ways to compile python code into both windows and Mac binaries, but is there a way to compile to a Linux binary?
actually I'm on windows so I can't compile it for mac users
so I am just someone who can compile it in mac and send me the files
pyinstaller says it works on linux. maybe try that?
Should I install Homebrew on Rosetta or Natively on the new m1 macs...?
I'm new to shell programming...
So I'm not able to decide...
I've been using tmux to run my bot on my old 32-bit machine lately.. but It seems to end the process for some reason.. I'm not sure if it's my machine restarting automatically or something else. Does anyone got any insight on this?
I'm on linux mint
I am attempting to watch my variables as my bot connects to discord. But I keep getting a time out.
How can I keep this from happening?
I am using pudb3 as my debuger.
Does anyone have any ideas which could lead me to an answer?
also run :checkhealth and post it.
So when I put in sudo apt-get update in my terminal it gives me an error
Although I install SSH previously which might have caused this error, I am not 100% sure.
Is the 404 for that oranchello icon theme or a private ip where your hosting an apt package?
@analog vessel is your code open or closed source?
for the icon theme
there's a github repo
@analog vessel I'll take a look after work
k
thanks
@tender lark the error "not valid for 10 hours..." is suspect to me. Did you secure the ssh after you added it? Is ntp configured for the instance?
Before it did that, I tried updating my Nvidia Graphics card driver and on the Ubuntu help forum for instructions and it said to install SSH before trying to update it in the terminal
and I did not know that I needed a remote server to use ssh
How to install the NVIDIA drivers on Ubuntu 20.04 Focal Fossa Linux
here's the instructions I was using
What kind of setup is it? A dedicated nix machine or a dual boot machine or a virtualmachine/container of some sort?
Is the date and time roughly correct on the one in trouble?
actually no
when I change the time on linux, it also changes the time on the other operating system
and vice versa
same i want..
@main olive use screen
good evening, i am stuck on a small problem form 4 hr actually i am unable to run my CGI enabled python file with python3 and when i am trying to import mysql.connector it shows me a error missing module but when i am trying to run the same with direct method it works fine.. PLEASE HELP ME!
mysql.connector, not sql.connector
yes sir i tried the same nnone of them are working
i am using apache server with CGI to run this file and interpreter is #!/usr/bin/python3
sounds like both o.s. are using the hardware clock, change one to not use it. you can try check config in a terminal with timedatectl
I'm trying to set my ssh server on WAN.. I'm port forwarding but when I use user@WANIP from outside network.. it doesn't work but it does get connected in local network.. how can I make it so that it's available on WAN?
@stark tide make sure you forwarded the right port 😉 and also make sure there isn't some additional firewall running on your local machine
local machine should be running sshd, listening on 0.0.0.0:22, and you should obviously be forwarding port 22
@formal schooner I tried to look around.. turns out I have wan_ip different from my public_ip... it's my ISP 😦
me neither... maybe ask in a networking forum of some kind
https://serverfault.com perhaps
(search before asking)
yeah
I'm learning ASP.net
and am having a issue
https://docs.microsoft.com/en-us/aspnet/core/tutorials/razor-pages/razor-pages-start?view=aspnetcore-5.0&tabs=visual-studio-code
I followed these instructions
(im on linux)
and when I do ctrl+f5 it just opens chrome and a localhost:8080 this site can't be reached
got it
I needed to do the dotnet run comman
Is it related with Python?
not in the slightest
kali linux or redhat?
I get they're different in general but
whats the key factor to make you pick one of the two sides?
@ me
Key factor: is it the right tool for the job.
Alternatives:
- pedigree of the distro
- governance/maintenance
What distro are you using @main olive
I recommend updating the repos
To somewhere near your country
debian
yeh i updated repost
before none command of apt was working
Make sure the repos are closer to your country
And remove the other ones
So I would say make the closest repo to your country in number one
i am from nepal
how can i get repos command lines
And the farther away your country gets from the repo lower in down by 1
🥺
What do you mean
The repos is usually in a file
You can get the actual repos from the debian website I believe
that is old ita was not working before i went linux repos on web and copy pasted in my file
Yeah some repos are down
You just have to do a trial and error I guess
yes
how can i get repos for my country
area
region
etc
i
i am using this right now
stop
don't use kali on your actual machine
🛑
Ah that's fucked practise
lol
kali is meant for vms
You can fuck up your debian install
thats kali not debian
yes
@main olive no he said it's Debian

look at screenshot
its obviously kali
unless he riced the heck out of debian
debain based kali
Yeah you can put the repo of kali on any distro lmao
kali based debian
so it is kali then?
So it's Debian or kali ?
@main olive
kali linux
🤦♂️
Bruh
yikes
skid alert?
😆 😅
Why The flying fuck did you say this than
what are you trying to do with kali
yes
cause kali is debain based probs
yes
so i said
Yeah but that doesn't mean they are the same
true
They have different repos
but why are you using discord on kali
how to fix that 🤦♀️?
why are you using kali?
Kali has a limited number of repos so idk
do you know what kalis for?
@main olive mate why do you care so much let him do whatever
I was a stupid skid once, I'm trying to help them realize don't do dumb stuff
I use kali as well
on bare metal?
Nun has happened to me
Yeah
🤣
IM DEAD
😕😕😶
I have 4gb ram so I can't really use a VM
It sucks but it's whatever
just install the kali packages
on your machine
smh
@main olive 👀
or use a live usb
@main olive I have tried that but it's not worth the trouble
Some shit just don't work the same
its really not that hard...
smh
Im gonna leave you two skids to it
Yeah if you have used john or any other one of those tools
have fun trying to use kali as a daily driver...
It's really stupid
I have john installed rn
it works the exact same on kali and debian and arch
john is john is john
its all the same
Can you turn it into john's format when cracking?
I know that shit doesn't work
yes
it does work
just install kali repos on debian
or black arch repos on arch
🤷♂️
So what's the point if you are going to be using kali's repo lmao
Normal repos from actual distros don't work
yes they do
in what world do they not?
Mate trust me they don't
...
They do
It installs
thats the point of them...
But you can't do shit with the formats
And all the extensions
then you have to manually compile
not a big deal
I heard there is a community version
or just use kalis binary
But I didn't have a good experience with that
Again why the fuck would you waste your time setting all that up when you can just use the kali iso instead?
Give me your reasoning
Educate me
Why shouldn't we use kali?
Don't give me some outdated shit with security either
@main olive yo you there?
Mate where tf did you go
I'm tryna ask you a question
What's so wrong with kali?
Also what is dumb stuff
Elaborate
Feel free to ping me I'm not about to let this slide
Take as much time as you need
running kali as your main os
is stupid
kali jtr isn't even jumbo
so you need to compile it anyways if you want all the formats
but anyways
kali is not designed to be a normal os
its for pentesting
that means installing normal applications require you to use weird tricks
also vanilla debian has a bunch of kali tools already anyways
its just that kali has them preinstalled
whither rpm distros now that Red Hat is part of the dark side
do you think that any linux based on RHEL still has a future
or will .deb win the packaging wars and RH-based distros die out after being bled dry by Big Blue
also i think they're running kali with root as default
which makes it extra insecure
@opaque ginkgo not that hard to create a new user for one
Second they don't
@opaque ginkgo Kali isn't designed to be that way but it doesn't mean you cant
Not really
vanilla debian has john, hydra, hashcat, gobuster, ffuf
True but they work the same way
I mean they do
But you are going to be bombarded with errors because of missing packages or shit like that
And it's kinda hard to troubleshoot
why would you get a missing package error
And most of them told me that they use kali's shit
@opaque ginkgo idk that's just the way it is
literally all of these are in the default debian repos
also
When you a re trying to convert formats and shit
vms exist
It just tells you that it's missing
And nothing you can do from there
kali doesn't have john jumbo either
@opaque ginkgo it's been so long I can't remember
you need to compile it on kali too
O
so its exactly the same as what would happen on vanill debian
True but if you want to use on bare metal why the fuck does anyone care it's the same shit
becausee
Because?
kali doesn't have 99% of actual user packages
What do you mean?
like actual applications that aren't for pentesting
Why would you use kali for anything else
I don't think you understand where I'm coming from
I'm talking about using kali for it's intended purpose just not on a VM
It's like using ubuntu as a pentesting distro
It's the same shit
Idk why people hate so much on kali
a bunch of people use ubuntu for pentesting but ok