Skip to content

Instantly share code, notes, and snippets.

View dsmith73's full-sized avatar
✔️
grind

Dan dsmith73

✔️
grind
View GitHub Profile
@dsmith73
dsmith73 / ssh-to-github.md
Created April 5, 2020 14:54
ssh - pushing to github without typing in credentials
@dsmith73
dsmith73 / git-cred-store.md
Last active April 5, 2020 18:19
store credentials to access github in credential store

from commandline type git config --global credential.helper store

Then you will need to use your credentials with another interaction with github
I chose to commit a file and push

Type in your creds when prompted and complete the process

Afterwords you shouldn't need to type in your creds again.

Test this by pushing another change.

@dsmith73
dsmith73 / brew-wsl.md
Last active May 28, 2024 07:59
install homebrew on wsl

Installing homebrew / Linuxbrew on Ubuntu-18.04 wsl for Windows 10


open wsl command line

type -

sh -c "$(curl -fsSL https://raw.githubusercontent.com/Linuxbrew/install/master/install.sh)"  
@dsmith73
dsmith73 / git-config-fatal-line-1.md
Last active November 22, 2023 06:51
fatal: bad config line 1 in file .git/config

fatal: bad config line 1 in file .git/config

When I receive this error, the fix is to:

rm -rf .git

Then, I can git init again, with a clean initialization, and it works...


@dsmith73
dsmith73 / wsl-mount-missing.md
Last active April 7, 2020 21:21
WSL not mounting drives

WSL isn't mounting drives

In my scenario, my D:\ drive was missing from WSL
using Ubuntu-18.04

To fix it, I did the following in WSL -

sudo nano /etc/fstab

add the following to /etc/fstab
@dsmith73
dsmith73 / docker-lessons-learnt.md
Last active April 29, 2020 18:41
Things I learned in Docker... The hard way!

Things that I learned in Docker

The hard way!

There is no specific order to these learnings. They're just the random learnings of a madman, trying to learn and use docker for the first time... So, I'm just throwing them out there as I recall them. I said "madman," right? Of course these aren't in any order...


@dsmith73
dsmith73 / my_novice_setup.md
Last active August 10, 2022 16:49
What does a novice use to develop?

What I (novice) use to develop

Since I always feel like I'm learning, re-learning, trying to learn, or more importantly, somehow failing to learn / figure something out; and since people are always asking me how I do what I do... I thought I'd toss this out there; with the hope that it helps someone else.



I started playing with code in the late 70s / early 80s, on a Commodore 64 that my dad bought. He used to get tons of different science magazines, and in particular, Popular Science (I think that was the one) used to send out snippets of binary code in their magazines. Being somewhat unruly, I managed to get grounded for a couple of weeks. So, my friend and I discovered these snips; one such snip was Dig-Dug. I spent so many quarters on that dang game, so when I saw it, I was like "Whoa! Check this out! If we type these pages of 1s and 0s into the computer, we can play Dig-Dug for FREE!!

>So, we went down to my room, and started typing... line after line... column after c

@dsmith73
dsmith73 / nmap-apt.md
Last active May 1, 2020 15:33
ubuntu nmap: snap vs apt

using nmap on ubuntu

I was creating a playbook to scan hosts and add them to an inventory. To start, I made my ansible playbook to install nmap on ubuntu with snap if it wasn't already installed.

The scan worked wonderfully, until I wanted to output to a file.

$ nmap -sn 10.10.10.0/24 -oX scan.xml
Failed to open XML output file scan.xml for writing

Deleting volume(s) on a flash drive from MAC terminal

I found myself searching for this a few times over the course of a couple days... So, it's time to make a small gist and "commit it to memory.".

This was the one that I liked the most -

diskutil list
@dsmith73
dsmith73 / azureAD_api.md
Created April 11, 2022 10:52
Working with the Azure AD API

Azure AD API - a novice's perspective

Trying to use the Azure AD API

Microsoft is great at documenting what it does, but everything reads like Encyclopedia Britanica. Simple guides, runbooks, and how-to articles are quite sparse, or at least hard to find.


My goal here is to walk you through interracting with the API.

OAUTH