Skip to content

Instantly share code, notes, and snippets.

View interglobalmedia's full-sized avatar
🎯
Just completed the Google Cybersecurity Certificate Program!

Maria Campbell interglobalmedia

🎯
Just completed the Google Cybersecurity Certificate Program!
View GitHub Profile
@rollwagen
rollwagen / lsof_netstat_on_macos.md
Last active February 8, 2024 17:06
lsof / netstat on macos

lsof / netstat on macos

lsof - list open files

  • display (list) all open TCP+UDP ports and grep for listening ones
    • sudo lsof -i -P | grep LISTEN
      COMMAND     PID           USER   FD   TYPE             DEVICE SIZE/OFF   NODE NAME
      launchd       1           root   11u  IPv6 0x26dd73cb700390df      0t0    TCP *:22 (LISTEN)
      ....
@carlssonk
carlssonk / deploy_node_do.md
Last active February 18, 2024 16:38
Deploy node.js app to DigitalOcean

Deploy Node.js Application to DigitalOcean

This step by step tutorial will show you how to set up a Node.js server with MongoDB to DigitalOcean using PM2, NGINX as reverse proxy and a SSL from LetsEncrypt. We will also add a custom domain name.

Prerequisites

Create Droplet & Generate SSH Key

@karlhillx
karlhillx / macos_big_sur_homebrew_apache_php_mariadb_2020.md
Last active May 10, 2024 03:16
macOS Big Sur 11.0 Setup: Homebrew + Apache + PHP + MariaDB (Regularly updated)

macOS Big Sur 11.0 Setup: Homebrew + Apache + PHP + MariaDB

This document helps get your macOS development environment up and running with the latest versions of Homebrew, Apache, PHP, and MariaDB.

@mlent
mlent / social-sharing-buttons.html
Last active February 24, 2023 08:22
Social sharing buttons
<ul>
<li>
<a href="https://twitter.com/share?text=TITLE OF YOUR POST via @YOUR_USERNAME&url=HTTPS://YOUR_WEBSITE.COM" onclick="window.open(this.href, 'twitter-share', 'width=550,height=235'); return false;">
Share on Twitter
</a>
</li>
<li>
<a href="https://news.ycombinator.com/submitlink?u=HTTP://YOUR_URL.COM&t=YOUR CONTENT" onclick="window.open(this.href, 'hn-share', 'width=550,height=350'); return false;">
Share on Hacker News
</a>
@jagdeepsingh
jagdeepsingh / README.md
Last active December 9, 2021 10:26
Set up macOS Catalina 10.15 with development tools | Git | Homebrew | rbenv | bundler | Atom | Databases | Node.js | Yarn | kubectl | Elastic Stack
@oseme-techguy
oseme-techguy / Correct_GnuPG_Permission.sh
Last active May 7, 2024 10:09
This fixes the " gpg: WARNING: unsafe permissions on homedir '/home/path/to/user/.gnupg' " error while using Gnupg .
#!/usr/bin/env bash
# To fix the " gpg: WARNING: unsafe permissions on homedir '/home/path/to/user/.gnupg' " error
# Make sure that the .gnupg directory and its contents is accessibile by your user.
chown -R $(whoami) ~/.gnupg/
# Also correct the permissions and access rights on the directory
chmod 600 ~/.gnupg/*
chmod 700 ~/.gnupg
@apolopena
apolopena / JSConvert12to24Time.js
Last active May 2, 2023 12:24
JavaScript: convert 12 hours time string to 24 hour time string
// NOTE: time string must look like this 07:05:45PM or this 07:05:45AM and account for 12:00:00AM and convert 12:00:00pm to 12:00:00
function timeConversion(s) {
const ampm = s.slice(-2);
const hours = Number(s.slice(0, 2));
let time = s.slice(0, -2);
if (ampm === 'AM') {
if (hours === 12) { // 12am edge-case
return time.replace(s.slice(0, 2), '00');
}
return time;
@MuhsinFatih
MuhsinFatih / pythondoneright.md
Last active May 9, 2024 04:07
How to recover from messed up python installation on mac, and never have to mess with apple's shitty python confusion factory

I am assuming you are here because like me, you installed a bazillion different python interpreters on mac and the whole thing is a spagetti. Today, I finally fixed my python installation. Whatever I install for python2 or python3 using pip JUST.WORKS.. My god! finally.

What the hell?

Here is what I had messed up, which you also probably did:

  • I had too many different python interpreters
  • Too many different symlinks which I lost track of
  • almost no package I installed with pip worked without a headache
  • any attempt to fix using online resources made it worse.
@kevinwhoffman
kevinwhoffman / resources-web-developers-designers.md
Last active January 26, 2024 21:20
Resources for Web Developers and Designers

Resources for Web Developers and Designers

This is an incomplete list of resources including courses and individuals who publish content that has helped me grow as a web developer and designer. Many of these resources are WordPress-specific as that is my current area of specialization. This list will grow over time. If you've got something to add, send me a link @kevinwhoffman and I'll check it out!

Course Providers