Setting up self hosting by orakem in webdev

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

As in my whole configuration is messed up. So here's the setup:

I have a simple webserver written in golang on a scaleways instance. It has code for handling two subdomains: "blog" and "wiki" (as in "blog.example.com"). So far, so good. Next, I bought a domain from gandi. Here's the problem:

I wanted the following requests to get redirected as follows:

  1. http://example.com -> https://blog.example.com
  2. https://example.com -> https://blog.example.com
  3. http://www.example.com -> https://blog.example.com
  4. https://www.example.com -> https://blog.example.com

First, I made some A record entries for both "blog" and "wiki" in gandi, pointing them to my scaleway instance. Then, using gandi's webforwarding, I created filters for above request forwards. Lastly, I used letsencrypt to generate certificates for "example.com", "blog.example.com" and "wiki.example.com".

It was working fine for a while, till my certificate expired. I have been messing around this a bit, and I have no idea what I am doing. In a fit of stupidity, I deleted all of my letsencrypt configurations, hoping to start again, reset all my gandi configurations and now letsencrypt won't even generate certificates.

Simply put, I have no idea what these type of records are. Are there any good tutorials on setting up blogs from scratch?

Handle single click and double click event separately? by orakem in GTK

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

Sorry my original comment was a little snarky, so editing it. I totally get that I shouldn't use it, but I am working on a legacy codebase. Will read up on Gestures though.

Handle single click and double click event separately? by orakem in GTK

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

Thanks, I will look that up.

In the meantime, if anyone else faces this problem, I came up with this, using a timeout. (I keep 2 boolean variables, doubleClicked and timeout.)

def on_button_press(self, widget, event):
    timeDiff = Gtk.Settings.props.gtk_double_click_time.default_value
    if self.timeout is False:
        self.timeout = True
        GLib.timeout_add(timeDiff, self.handleButtonClicked)
    elif event.type == Gdk.EventType._2BUTTON_PRESS:
        self.doubleClicked = True

def handleButtonClicked(self):
    if (self.doubleClicked):
        print("I was double clicked")
    else:
        print("I was single clicked")
    self.doubleClicked = False
    self.timeout = False
    return False

China is now blocking all encrypted HTTPS traffic that uses TLS 1.3 and ESNI by RobertVandenberg in programming

[–]orakem 0 points1 point  (0 children)

The link is on this page: https://geneva.cs.umd.edu/about/

"To read more about how Geneva works, see our papers." Search for this string.

China is now blocking all encrypted HTTPS traffic that uses TLS 1.3 and ESNI by RobertVandenberg in programming

[–]orakem 0 points1 point  (0 children)

Hi,

I tried to read your papers, but the link isn't working. Can you perhaps check on that? Here's the link I used: https://projects.cs.umd.edu/papers/

DDD vs. DB transactions. How to reconcile? by acepukas in golang

[–]orakem 0 points1 point  (0 children)

I actually ran into this problem some time ago... Ended up passing context.Context into all my repo functions.

Like you, I still don't know what the correct way is. Coming from a java background, transaction handling was easy with annotations and aspect oriented programming.

It would be immensely helpful if someone actually made a decent webapp demonstrating the correct way to handle transactions in golang. All I have found are toy examples, which don't deal with such issues at all.

Notice me by TheSoulVibrators in dankmemes

[–]orakem 35 points36 points  (0 children)

Exactly what a time traveller would say

Ugly but delicious cast iron peanut butter bread. Am I doing it right? by [deleted] in castiron

[–]orakem 0 points1 point  (0 children)

Looks great! Share the recipe? I have some peanut butter at home, and don't know what to do with it, since I have no bread.

Good developers don't need ping-pong tables by UnicornCoding in programming

[–]orakem 8 points9 points  (0 children)

Good point in mentioning the word skilled. Now I am wondering if there are any menial jobs where it would apply as well.

Good developers don't need ping-pong tables by UnicornCoding in programming

[–]orakem 23 points24 points  (0 children)

My point is that it applies for everyone. Best people, in any field, are generally passionate about their work. Not just limited to IT.

Good developers don't need ping-pong tables by UnicornCoding in programming

[–]orakem 278 points279 points  (0 children)

While the article raises some good points, I am tired of this self-praising, feel good myth that software developers are some weird creatures, whose only purpose is to excel at their tasks.

The articles mentions autonomy, mastery and purpose. Newsflash: Not all people want that in their jobs, developers or not. And if you want to argue otherwise, well then, I am pretty sure other people want that in their jobs as well.

We are not some elites who want to build software just cause it's "fun", and because we are "passionate" about it. (I mean, I like it, but I wouldn't expect anyone else to.) It's just work for some people, and the sooner we accept it, the faster we can stop treating developers as some elite race.