Set a proxy and carry over the values to sudo

If you’ve ever been behind an enterprise proxy server and needed to reach things on the outside, you probably know how frustrating it is to try and just use your normal commands for something as simple as a wget. So, to get started you will need to know the URL and port for your proxy server, but once you have that, start by editing your .bashrc and add the following (setting proxyhost, the port, and adjusting “no_proxy” as appropriate)…

function proxyon(){
     echo -n "password (for proxy): "
     read -es password
     export http_proxy="http://$USER:$password@proxyhost.com:8181/"
     export HTTP_PROXY=$http_proxy
     export https_proxy=$http_proxy
     export HTTPS_PROXY=$http_proxy
     export ftp_proxy=$http_proxy
     export rsync_proxy=$http_proxy
     export no_proxy="localhost,127.0.0.1,localaddress,.localdomain.com,.domain.com"
     echo -e "\nProxy environment variable set."
}
function proxyoff(){
     unset HTTP_PROXY
     unset http_proxy
     unset HTTPS_PROXY
     unset https_proxy
     unset FTP_PROXY
     unset ftp_proxy
     unset RSYNC_PROXY
     unset rsync_proxy
     echo -e "\nProxy environment variable removed."
}

# remove next line if you don't want to set proxy automatically on login
proxyon

Now you can turn your proxy on and off with the “proxyon” and “proxyoff” commands, but that doesn’t help you when you try to install something with yum or apt that requires sudo. To carry over the proxy values, you’ll need to “sudo visudo” and add the “Defaults” line like shown below…

###############################################
# DO NOT ADD ANYTHING FROM HERE TO END OF FILE #
#
#includedir   /etc/sudoers.d
#
# DO NOT ADD ANYTHING ABOVE THIS LINE###########
Defaults env_keep = "http_proxy https_proxy HTTP_PROXY HTTPS_PROXY ftp_proxy"

… and now, hopefully you are all set.

Like this? Consider joining my mailing list, or at least using my affiliate link when buying from Amazon ๐Ÿ™‚

You or someone you know looking to buy or sell?

Configure a Static IP in Ubuntu 18.04

As with all things Linux there’s a million ways to do things, and every brilliant release comes up with a new way to do the same old things in a “better” way. Can you tell I’m be sarcastic yet? Good.

Anyway, after spending over an hour trying to get a freakin static IP on my desktop box I thought I’d share in case it saved anyone hours of their life.

My simple goal was to provide a static IP. Nothing more. Nothing less. Well, the “better” way of doing it now appears to be with “netplan”, and unless you enjoy banging your head against the wall, just create/edit this file and replace with the network interface (enp3s1), IP (192.168.20.55) and gateway (192.168.20.1) of your choice (this config appears to use the DNS servers from the router w/ DHCP turned on). Oh yeah, and don’t bother with the GUI based configuration tool, because apparently they’re not connected at all, and using this will force the config from this file (you’ve been warned and saved hours)

sudo nano /etc/netplan/01-networkd.yaml

# this is the actual file content
network:
  version: 2
  renderer: networkd
  ethernets:
    enp3s1:
      dhcp: no
      addresses: [192.168.20.55/24]
      gateway4: 192.168.20.1
Like this? Consider joining my mailing list, or at least using my affiliate link when buying from Amazon ๐Ÿ™‚

You or someone you know looking to buy or sell?

Update modification timestamp on DB2 table automatically

Ever want to update your modification timestamp field any time an update is made to the row without having to add application logic? Well, DB2 makes it relatively painless…

alter table XX.MY_TABLE add column last_updated_ts timestamp not null
generated by default for each row on update as row change timestamp

Check out these resources for additional information…

  • https://www.ibm.com/support/knowledgecenter/SSEPGG_11.1.0/com.ibm.db2.luw.admin.dbobj.doc/doc/c0051498.html
  • https://www.ibm.com/support/knowledgecenter/SSEPGG_11.1.0/com.ibm.db2.luw.sql.ref.doc/doc/r0000888.html
Like this? Consider joining my mailing list, or at least using my affiliate link when buying from Amazon ๐Ÿ™‚

You or someone you know looking to buy or sell?

Stop Stealing Dreams (by Seth Godin)

If you’ve ever read or listened to anything by Seth Godin you know he has a knack for asking thought provoking questions, and challenging conventional wisdom. As such, he recently did a three part series on his Akimbo podcast about what school is for that I found fascinating. Hope they make you stop and think too.

S 3 E 9 Stop Stealing Dreams

S 3 E 10: Connect the DotsQ&A about Stop Stealing Dreams

S 3 E 11 Getting In (to a Famous College)

Find more atย www.stopstealingdreams.comLike this? Consider joining my mailing list, or at least using my affiliate link when buying from Amazon ๐Ÿ™‚

You or someone you know looking to buy or sell?

Is it time to quit social media?

As I read this article what was running through the back of my mind was, “is it time to quit social media?”, and to be honest… but for being involved in real estate and a large bulk of that requiring being “engaged” I’m not sure I have much use for it. Never before has it been easier for marketers to target and connect with their “target audience”. You do realize that’s what social media has become right? The proverbial barrel where the fish are to shoot.

So, is it possible to take back the social networks? I’m not sure it is – at least with the current companies. Built from the ground up, or under a completely different model – maybe. But as the article linked to above points out it would be to the detriment of the “bottom line”.

Would I like a feed where I only see posts from my family, and maybe some other groups at my leisure? Of course, but unless I’m paying for that the only recourse I have is to a platform that has the resources to provide it based on the party that is willing to pay for it – the marketers.

So what would this “social media” service of the future look like? Number one, it should be built on a privacy, no-advertising first model. Second, I believe it should be decentralized, but speak a standard protocol – just like how email service is provided. Then, organizations like companies, teams, or even families could manage their own little groups and individuals could determine what they want to see or who they want to connect with…

And yet, as I sit here writing this, I wonder if it’s even possible or needed. After all, I’m able to run my own little blog right here. You can share it on social media if you so choose. In fact, I’ll probably post it to my account – and try not to look at the “likes” or “comments” that fuel the FB “engagement” engine.

So, while I may have just rambled for a number of paragraphs, let me finish by encouraging you to consider your use of social media, and at a minimum strongly consider turning off your notifications and moving the app to a sub-folder on your phone (just those two things alone have made a huge difference in my life). I would also encourage you to look into downloading and using Signal Messenger in place of text messaging and especially in favor of the social media messaging platforms.

Until we figure something out, you can always find me right here.Like this? Consider joining my mailing list, or at least using my affiliate link when buying from Amazon ๐Ÿ™‚

You or someone you know looking to buy or sell?

Lunch with Governor Jackwagon

So we were on Mackinac Island this past weekend and a friend of ours starts telling us about how good the Chuckwagon restaurant is, but it’s a tiny little hole in the wall. We get there around 11:30 to a sign saying they’re closed until noon so of course we hit up a few local fudge shops for some samples. Around 11:40, our friend’s son starts getting concerned about having to wait so they go start a line out front (good thing too). We get back from dinking around and there’s at least 3-4 families in line.

So we’re hanging out (prob 11:50) when all of a sudden 3 or so guys looking like golf pros come pull up on their bikes and just walk in the joint like they own it! A few minutes later another party of 4 or 5 do the same thing. The line watches in shock as they proceed to the back and take 1 of 2 family sized booths (the rest is lunch counter and 2 person high tops). Naturally, there’s some grumbling so I ask one of the “golf pros” that was still outside something along the lines of, “so, they friends of the owner or something?” And he mumbles something like “they needed a seat” and walks off. I’m think, “no shit Sherlock. That’s why we’re standing here”, and our friend says “that was very cloak and dagger. Didn’t really answer your question”.

Grumbling ensues for the remaining time in line, but we eventually get let in and all is good with the world when we get to sit down and order. Probably 10-15 minutes go by and we’re eating when our friend turns to me (I was at the counter not in the booth) and starts mouthing something rather emphatically. I of course have no idea what he’s trying to say, but luckily Mary does who translates, “is that the Governor?” From my vantage point I can’t see anything, but use my children as an excuse to “make sure they’re eating their food” and if there’s any for me ๐Ÿ™‚ as I do so I sneak a peek and there’s no doubt it’s Governor Snyder. On my way back to my seat I notice two of the “golf pros” sitting there watching very intently and put two and two together that it’s his security detail.

Anyway, we continue or meals for a bit longer but our friend can’t just let it go so engages their party in conversation. I can’t hear most of it due to my location but I do overhear him talking about the “jackwagons” that cut in line, which him (the Governor) and his friends got a kick out of.

Long story short he was gracious enough to get a photo with the kids, and was pleasant in our brief interaction. So, not getting into politics the “Jackwagon” was just a convenient reference to the “chuckwagon”, and not an insult.

So that’s my story of how I had lunch with (next to) the Governor, and being a big deal by proximity.Like this? Consider joining my mailing list, or at least using my affiliate link when buying from Amazon ๐Ÿ™‚

You or someone you know looking to buy or sell?

Including the version in a Maven artifact

Recently I wanted to include the version of an artifact generated by a Maven build into a text file in that artifact. As Google and and good friends will help you with, I was pointed to this article that was exactly what I wanted.

Basically, create a /src/main/resources/version.txt file with the following content…

${project.version}

… then including the following snippet in your “build”…


<build>
  <resources>
    <resource>
      <directory>src/main/resources</directory>
      <filtering>true</filtering>
      <includes>
        <include>**/version.txt</include>
      </includes>
    </resource>
    <resource>
      <directory>src/main/resources</directory>
      <filtering>false</filtering>
      <excludes>
        <exclude>**/version.txt</exclude>
      </excludes>
    </resource>
  </resources>
</build>

Like this? Consider joining my mailing list, or at least using my affiliate link when buying from Amazon ๐Ÿ™‚

You or someone you know looking to buy or sell?

Schooling – The Minimalists Podcast

You have to listen to this! If you donโ€™t think you have time, start at 45 minutes.ย T.K. Coleman makes some great points.

Schooling – The Minimalists PodcastLike this? Consider joining my mailing list, or at least using my affiliate link when buying from Amazon ๐Ÿ™‚

You or someone you know looking to buy or sell?

A Day In The Life of my Supposedly Frugal Stomach

Another good post by Mr Money Mustache. Probably the biggest thing that jumped out at me was this…

A cost difference ofย just $1.50 per person per meal, multiplied over a four-person familyโ€™s 372 meals per month makes a difference ofย $558 per month, or about $96,000 per decadeย after compounding.

Which, even if you don’t compound is around $65,000 in a decade.

A Day In The Life of my Supposedly Frugal StomachLike this? Consider joining my mailing list, or at least using my affiliate link when buying from Amazon ๐Ÿ™‚

You or someone you know looking to buy or sell?

25 Productivity Tips and Hacks That Actually Work

Listen to/watch the video for details on all the below items, but this is a great list!

  1. Be proactive about being productive
  2. Outsource the Small Stuff
  3. Batch Similar Small Tasks
  4. Don’t Watch Too Much TV
  5. Focus on the 80/20 Rule
  6. Never Sit Down Without Knowing What You’re Going to Work on
  7. Time-Block Activities
  8. Wake Up Earlier
  9. Don’t Multitask
  10. Stop Paying Attention to the News
  11. Have a Dedicated Work Space Free of Distractions
  12. Focus on Being Effective, Not Just Efficient
  13. Sharpen You Ax
  14. Say No a Lot More – “Every yes is a no to your wife and kids”
  15. Reduce Social Media Usage
  16. Shorten Your Deadlines
  17. Review Your Goals Regularly
  18. Don’t Anwer Your Phone
  19. Do What You Love
  20. Find More Ways to Get into Flow
  21. Moderate Your Screen Time
  22. Hire a Coach
  23. Join a Mastermind Group
  24. Track the Things that Matter
  25. Get Really Good at What You Do

Like this? Consider joining my mailing list, or at least using my affiliate link when buying from Amazon ๐Ÿ™‚

You or someone you know looking to buy or sell?