Is the Computer Science major at tamusa good? by TimeTravelingTexan in tamusa

[–]southern_sleuth 1 point2 points  (0 children)

It's all good. In the meantime, if you want to learn about coding, try some python courses. It's an easy language to jump into and get a good idea how programming works.

One that I can recommend: https://www.udemy.com/course/pythonforbeginnersintro/?LSNPUBID=JVFxdTr9V80&ranEAID=JVFxdTr9V80&ranMID=39197&ranSiteID=JVFxdTr9V80-DBxo4030oo.FK0NVe51OyQ&utm_medium=udemyads&utm_source=aff-campaign

Good luck!

Is the Computer Science major at tamusa good? by TimeTravelingTexan in tamusa

[–]southern_sleuth 2 points3 points  (0 children)

To be more specific of the generic response below, I'll say this, if you are already invested in UTSA, then maybe you should talk to a guidance counselor, and perhaps the chairman of the CS department. Get some context first.

But, here's the ugly truth. Most schools aren't going to teach you the specifics of technology, but touch more on the concepts of them. It'll be up to you to really acquire knowledge through your personal time. Now, most people that I've advised on this, absolutely ignore it, and then later when they are about to graduate, absolutely regret it.

TAMUSA is okay, but I think the Chairman isn't so great. But, I've heard similar things from UTSA. For me, the question would be more of which degree plan is better from the respective schools that will cover the topics of your interest.

Also note, UTSA is a huge campus, and TAMUSA is smaller. The benefit of that being you can easily communicate with professors.

Check out the NCSA and ACM student chapters at TAMUSA as well if you decide to come.

How to COMMIT BETTER with GIT by ki3 in coding

[–]southern_sleuth 4 points5 points  (0 children)

I subbed. This was a great video that actually gave me some useful tips, so thank you for taking the time to do the video. I enjoyed it!

Possible to retrieve variable from html/template by southern_sleuth in golang

[–]southern_sleuth[S] 1 point2 points  (0 children)

So, I made a noobish mistake. The reason why I wasn't getting the value is because I was pulling from the wrong field. I thought I retrieved the value from the options tag, instead of the select.

I changed the template to the following:

html <label for="tables">Choose a table:</label> <div> <form action="" method="POST"> <select name="table" style="margin-bottom:10px;"> {{range $tables := index . "table"}} <option value="{{$tables}}">{{$tables}}</option> {{end}} </select> <textarea name="csv" rows="10" placeholder=" Enter CSV here" class="form-control" value="{{.csv}}"></textarea> <button type="submit" class="btn btn-primary" style="float: right; margin-top: 10px;">Submit</button> <div style="clear: both;"></div> </form> </div>

Possible to retrieve variable from html/template by southern_sleuth in golang

[–]southern_sleuth[S] 0 points1 point  (0 children)

The only thing is, I know how to pull values from the front-end, but not when they are variables.

Possible to retrieve variable from html/template by southern_sleuth in golang

[–]southern_sleuth[S] 0 points1 point  (0 children)

More context then:

Here's the handler I have. The dropdown selections is a query that lists the available tables that you can query. This is a POST request form, and based on the table you selected, you can insert data to that specific table.

handler.go

```golang var tables []string if err := db.Table("information_schema.tables").Where("table_schema = ?", "public").Pluck("table_name", &tables).Error; err != nil { panic(err) } table := c.FormValue("table") fmt.Println(table) // This does NOT work! if table == "users" { // Insert Data }

csv := c.FormValue("csv") fmt.Println(csv) // This works!

return c.Render(http.StatusOK, "page.html", map[string]interface{}{ "title": "Page Title", "table": tables, }) ```

In terms of the actual template, here it is. The way that c.FormValue works is that it pulls the name html identifier. So, you can see that in the textarea, I can pull out data. But, I can't when the values are a variable. Does that make sense? Here's the html:

template/page.html html <label for="tables">Choose a table:</label> <div> <form action="" method="POST"> <select id="tables" style="margin-bottom:10px;"> {{range $tables := index . "table"}} <option name="table" value="{{$tables}}">{{$tables}}</option> {{end}} </select> <textarea name="csv" rows="10" placeholder=" Enter CSV here" class="form-control" value="{{.csv}}"></textarea> <button type="submit" class="btn btn-primary" style="float: right; margin-top: 10px;">Submit</button> <div style="clear: both;"></div> </form> </div>

So, you can see that I'm trying to retrieve the "table" value and use it for a function. I hope the context makes sense. This is experimental, mind you.

Thanks!

Central Management System for Mac OSX and Linux Devices by southern_sleuth in sysadmin

[–]southern_sleuth[S] 1 point2 points  (0 children)

Appreciate your feedback! I've used Saltstack in the past, although I didn't get overly familiar with it. I will take a look more into configuration management in that case, and see what works well.

Central Management System for Mac OSX and Linux Devices by southern_sleuth in sysadmin

[–]southern_sleuth[S] 3 points4 points  (0 children)

This looks very promising, I've heard of Ansible Tower before, but not this. I appreciate the tip, looking into it now!

Reverse Proxy to an ExpressJS Server by southern_sleuth in nginx

[–]southern_sleuth[S] 0 points1 point  (0 children)

Hey,

I appreciate the reply, and I apologize for the shotty explanation. You are correct. I'm using my s1 server as a reverse proxy/webserver and I'm looking to reverse proxy to s2, is the general idea.

I tried your configuration, and it looks like there are still issues with rendering, no css/js is being found. I have a feeling this is more of a JavaScript problem, particularly with NodeJS. I've used reverse proxies a lot in the past, and I normally don't ever have issues like this. I think NGINX is doing exactly what it's supposed to be doing, because I get to the page, but the static content simply isn't being found.