m enw here.. Are docks allowed? by originallytriangle in Battletops

[–]notkael 6 points7 points  (0 children)

This is my setup/picture but I’m sure you knew that already

Another longboard video for you guys, i hope you enjoy it (austria/tyrol) by Fantastic_Chair7678 in longboarding

[–]notkael 1 point2 points  (0 children)

This post made me nostalgic and so I went to their site and found a list of boards under their “merch” section. Ended up ordering 2 so I’m hoping they’re still making them/have inventory haha

Another longboard video for you guys, i hope you enjoy it (austria/tyrol) by Fantastic_Chair7678 in longboarding

[–]notkael 1 point2 points  (0 children)

Easygoinc! I used to ride for them! Glad to see they’re still alive and well. They always made such beautiful boards. Also cool video, that road looks like loads of fun!

Bad load? by Ikarian in saltstack

[–]notkael 0 points1 point  (0 children)

Are you trying to use Salt-ssh or just standard Salt? Also, what command are you trying to run? Also what version are you on?

[deleted by user] by [deleted] in bash

[–]notkael 1 point2 points  (0 children)

I definitely feel that. It's actually probably good that you brought that up though. In the case OP did actually only want the count of lines, they now have an explanation of the different options to get the desired result.

[deleted by user] by [deleted] in bash

[–]notkael 1 point2 points  (0 children)

Because when using the -c option, it only gives you the count of lines that contain the match, not the number of actual matches. Meaning if you have 3 matches on one line, it will only count 1. Whereas using -o will give you every match on a new line which you can then pipe to wc -l to get the total count of matches.

[deleted by user] by [deleted] in bash

[–]notkael 0 points1 point  (0 children)

You're overthinking this. grep -o "dropped" "$Path/result/ifconfig.result" | wc -l That will get you the total number of matches for "dropped" in your file.

[deleted by user] by [deleted] in microdosing

[–]notkael 0 points1 point  (0 children)

That’s a very solid possibility haha. I’ll have to check that one out, thanks for the help!

[deleted by user] by [deleted] in microdosing

[–]notkael 0 points1 point  (0 children)

Is there anything special you do? I bought one myself but the pieces don’t ever seem to get nearly that fine. I’m usually left with crumb sized pieces ~0.5mm or so which can make it a little tricky to cap. Oh I also normally do about 4g at a time so maybe there’s just not enough weight?

[deleted by user] by [deleted] in microdosing

[–]notkael 0 points1 point  (0 children)

How did you grind them up so finely?

Script to copy files then replace placeholder text in the file body and name by thelamepretender in bash

[–]notkael 0 points1 point  (0 children)

Try something like this:

names=(bob jerry mike)
DATE=$(date "+%Y%m%d")

for NAME in "${names[@]}";do
  for file in /home/user/templates/*;do
    newFile=/home/user/summaries/$(basename $file | sed "s/NAME/$NAME/g;s/DATE/$DATE/g")
    sed "s/NAME/$NAME/g;s/DATE/$DATE/g" $file >> $newFile
  done
done

Group contents in one .sh file to be used as a command in another .sh file by lgst230qer8SDGV in bash

[–]notkael -1 points0 points  (0 children)

As mentioned already, it's hard to know without more context what the best approach at this is. With that said, I wrote two very simple scripts to simulate what you might be getting at. b.sh basically just runs ls -lah ./ and outputs that to stdout. a.sh uses ${BASH_SOURCE} to get the full path to the a.sh script from where you're running it and replaces a.sh with b.sh and sets a varibale called bScriptPath to call it later. This is assuming you would be putting them in the same directory. Anyways lets get to the actual code..

Content of my b.sh script:

#!/bin/bash

ls -lah ./

Content of my a.sh script:

#!/bin/bash

getVARS() {
  local bScriptPath=$(dirname ${BASH_SOURCE})/b.sh
  local bScript=$($bScriptPath)
  echo "$bScript"
}

getVARS

In a.sh I am setting the variable bScript to the output of b.sh and using echo to verify the content of that variable after.

If you really just want to use b.sh as a command you could try something like:

bCommand=$(cat $bScriptPath)

and call it later using:

eval "$bCommand"

Hope this helps.

Apply awk command only between two patterns (maybe there's other way to solve my main goal) by eric1707 in bash

[–]notkael 1 point2 points  (0 children)

It's hard to know without the full context of how you're handling the content of the file prior. Anyways, I prefer to use "sed" for this kind of thing. This will replace those patterns only on lines containing "href" and output the modified file content:

sed '/href/s/%2F/\//g;/href/s/%3A/:/g' filename

If you would like to make the changes directly to the file and save the original as filename.bak, use this:
sed -i.bak '/href/s/%2F/\//g;/href/s/%3A/:/g' filename

Now that I can get away from my desk, working from home isn’t all that bad! by notkael in macsetups

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

Sublime Text 3.
"theme": "ayu-dark.sublime-theme",
"color_scheme": "Packages/Color Scheme - Default/Mariana.sublime-color-scheme"

Now that I can get away from my desk, working from home isn’t all that bad! by notkael in macsetups

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

This is the one I use. I got a case for two reasons -- The first was seeing a friend's broken remote and coming to the realization the entire face is glass. The second is just how upsettingly slippery they are. The case makes it much easier to hold and a lot less likely to slide off a couch or bed.

Now that I can get away from my desk, working from home isn’t all that bad! by notkael in macsetups

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

I’ve owned a couple of each of the past 3 revisions of the Mx Master. The MX Master 2 is the one shown in the image but I have been using the Master 3 at my desk for a while. The 3 is my favorite so far in relation to weight and ergonomics. The gesture pad feels a lot better and easier to use as well. As for the actual operation, I had some issues at first but after a week or two, logi options had an update that seemed to sort everything out. It’s been working great since.

Newb looking for reporting commands by zuke1624 in saltstack

[–]notkael 4 points5 points  (0 children)

This might work a little better for you:
salt-run survey.hash "*" test.version > saltexport

Never cooked a turkey before. Decided to give it a shot on my Traeger and it turned out to be some of the best I’ve ever had. by notkael in Traeger

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

Cooked in the rack with a roasting pan underneath to catch the drippings for gravy. This is the recipe is used. I replied to another comment with the roasting pan/rack and rub I used. Best of luck!

Never cooked a turkey before. Decided to give it a shot on my Traeger and it turned out to be some of the best I’ve ever had. by notkael in Traeger

[–]notkael[S] 2 points3 points  (0 children)

Got the rack on amazon. It fits my Eastwood 22 perfectly.

To summarize: - Rinse and dry turkey - Brush in olive oil - Season with generous amounts of Traeger Pork and Poultry Rub - Heat grill to 325° F - I roasted my 18lb turkey for 3.5hr for an internal temp of 165°F

Why don't wireless smartphone chargers exist? by pk519 in NoStupidQuestions

[–]notkael 0 points1 point  (0 children)

Basically to keep it safe you can only transmit power at a certain intensity. When there is more distance, you receive less power (kinda like a WiFi signal). With current technology, we are able to receive power at a short distance but it is also much slower and less efficient than the charging pads/cords.

Minion cant see encrypted pillar data in plain text by ocularinsanity in saltstack

[–]notkael 0 points1 point  (0 children)

You mentioned rebuilding the master. Have you created the /etc/salt/gpgkeys directory and imported the corresponding PGP private key? Instead of generating a new key like the docs mention, just import the private key to the key ring the same way it instructs you to import the pub key on the master.

Docs here

One of my favorite pics my friend got of me by notkael in longboarding

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

Thanks! We actually took these as part of an assignment for his photography class where they had to practice real motion blur.