Skip to content

Instantly share code, notes, and snippets.

View mdfilio's full-sized avatar

Michael Filio mdfilio

  • San Antonio, Texas
  • 19:21 (UTC -06:00)
View GitHub Profile
@mdfilio
mdfilio / add-dod-certs.sh
Last active September 6, 2022 21:10 — forked from AfroThundr3007730/add-dod-certs.sh
Import DoD root certificates into linux CA store
#!/bin/bash
# Import DoD root certificates into linux CA store
main() {
# Location of bundle from DISA site
url='https://public.cyber.mil/pki-pke/pkipke-document-library/'
bundle=$(curl -s $url | awk -F '"' 'tolower($2) ~ /dod.zip/ {print $2}')
#bundle=https://dl.dod.cyber.mil/wp-content/uploads/pki-pke/zip/certificates_pkcs7_v5-6_dod.zip
# Set cert directory and update command based on OS
@mdfilio
mdfilio / 2_main.js
Created August 27, 2019 17:26
node.js
"use strict";
const getJSONString = obj => {
return JSON.stringify(obj, null, 2);
};
const port = 3000,
http = require("http"),
httpStatus = require("http-status-codes"),
app = http.createServer();
@mdfilio
mdfilio / gitproxy-socat
Last active August 29, 2015 14:16 — forked from sit/gitproxy-socat
#!/bin/sh
# Use socat to proxy git through an HTTP CONNECT firewall.
# Useful if you are trying to clone git:// from inside a company.
# Requires that the proxy allows CONNECT to port 9418.
#
# Save this file as gitproxy somewhere in your path (e.g., ~/bin) and then run
# chmod +x gitproxy
# git config --global core.gitproxy gitproxy
#
# More details at http://tinyurl.com/8xvpny
@mdfilio
mdfilio / new_bashrc.sh
Created August 11, 2012 08:19 — forked from josephwecker/new_bashrc.sh
Replace .bashrc, .bash_profile, .profile, etc. with something much more clean, consistent, and meaningful.
#!/bin/bash
# License: Public Domain.
# Author: Joseph Wecker, 2012
#
# Are you tired of trying to remember what .bashrc does vs .bash_profile vs .profile?
# Are you tired of trying to remember how darwin/mac-osx treat them differently from linux?
# Are you tired of not having your ~/.bash* stuff work the way you expect?
#
# Symlink all of the following to this file:
# * ~/.bashrc