Skip to content

Instantly share code, notes, and snippets.

@jftuga
jftuga / active_directory_contacts.cs
Last active October 13, 2020 02:31
Retrieve Active Directory Contacts Belonging to a Group
/*
Given an AD group name, return all of the AD Contacts that belong to that group
Return a list of strings in this format:
CN Name|Email Address
*/
using System.DirectoryServices;
@jftuga
jftuga / go-os-arch.md
Created December 4, 2020 19:07 — forked from asukakenji/0-go-os-arch.md
Go (Golang) GOOS and GOARCH

Go (Golang) GOOS and GOARCH

All of the following information is based on go version go1.14.7 darwin/amd64.

A list of valid GOOS values

(Bold = supported by go out of the box, ie. without the help of a C compiler, etc.)

  • aix
  • android
@jftuga
jftuga / macapp.go
Last active December 8, 2020 12:33 — forked from mholt/macapp.go
Distribute your Go program (or any single binary) as a native macOS application
// Package main is a sample macOS-app-bundling program to demonstrate how to
// automate the process described in this tutorial:
//
// https://medium.com/@mattholt/packaging-a-go-application-for-macos-f7084b00f6b5
//
// Bundling the .app is the first thing it does, and creating the DMG is the
// second. Making the DMG is optional, and is only done if you provide
// the template DMG file, which you have to create beforehand.
//
// Example use:
@jftuga
jftuga / input.txt
Last active December 12, 2020 00:13
Zebra .elp2 files
A329,349,0,1,1,1,N,"REF: 3717559625"
A39,363,0,1,1,1,N,"INV: "
A39,377,0,1,1,1,N,"PO: "
A429,377,0,1,1,1,N,"DEPT: "
A329,349,0,1,1,1,N,"REF: 2222222333"
A39,363,0,1,1,1,N,"INV: "
A39,377,0,1,1,1,N,"PO: "
A429,377,0,1,1,1,N,"DEPT: "
@jftuga
jftuga / enable_clearpass.bat
Created January 26, 2021 20:50
Enabling Aruba ClearPass on a switch port
@echo off
setlocal
set PORT=%1
if not defined PORT goto ERR
@echo conf t
@echo vlan 1 untag %PORT%
@echo no port-security %PORT%
@echo aaa port-access authenticator %PORT% client-limit 1
@jftuga
jftuga / MyViewController.cs
Created January 28, 2021 20:39 — forked from ShayMe21/MyViewController.cs
Xamarin with Auth0 and TouchID Authentication
// https://github.com/auth0-community/auth0-xamarin-oidc-samples/tree/master/Quickstart/01-Login/iOS
using System;
using UIKit;
using Auth0.OidcClient;
using System.Text;
using LocalAuthentication;
using Foundation;
using Xamarin.Auth;
@jftuga
jftuga / bounded.go
Created February 14, 2021 13:16
Go Concurrency Patterns: Pipelines and cancellation
// Copied from: https://blog.golang.org/pipelines/bounded.go
package main
import (
"crypto/md5"
"errors"
"fmt"
"io/ioutil"
"os"
@jftuga
jftuga / text_based_news_services.md
Last active February 21, 2021 21:52
Text based news services
@jftuga
jftuga / compare_dt_libs.go
Last active April 20, 2021 15:52
comparing go date/time libraries
// compare_dt_libs.go
// comparing go date/time libraries
package main
import (
"fmt"
"github.com/btubbs/datetime"
"github.com/jinzhu/now"
@jftuga
jftuga / github_project_list.md
Created May 16, 2021 20:02
GitHub Project List

https://github.com/jftuga/sqs_clipboard - Use AWS SQS as a clipboard to copy and paste across different systems and platforms

https://github.com/jftuga/gofwd - A cross-platform TCP port forwarder with Duo 2FA and Geo-IP integration

https://github.com/jftuga/spotprice - Quickly get AWS spot instance pricing

https://github.com/jftuga/ipinfo - Return IP address info including geographic location and distance when given IP address, email address, host name or URL

https://github.com/jftuga/photo_id_resizer - Resize photo ID images using face recognition technology