Skip to content

Instantly share code, notes, and snippets.

View jcoffi's full-sized avatar

Justin Coffi jcoffi

View GitHub Profile
@jcoffi
jcoffi / 0-4-steps-get-docker-with-gpu-on-ubuntu-2004.md
Created January 25, 2023 18:49 — forked from hideojoho/0-4-steps-get-docker-with-gpu-on-ubuntu-2004.md
4 steps to get a docker running with GPU on Ubuntu 20.04

⚠️ The following instruction is written on 25 Jul 2020 (= old).

4 steps to get a docker running with GPU on Ubuntu 20.04

Environment

  • Ubuntu 20.04
  • CUDA 10.2
  • Docker Latest
@jcoffi
jcoffi / alpaca_downloader.py
Created November 26, 2021 23:31 — forked from alg0trader/alpaca_downloader.py
alpaca stock downloader
###############################################################################
# module: stock_downloader.py
# description: This script will download a given stock from the Alpaca
# API.
# author: Austin Schaller
###############################################################################
import pytz
import os, time
@jcoffi
jcoffi / Reset-LocalAccountPassword.ps1
Created September 11, 2020 21:24 — forked from Bill-Stewart/Reset-LocalAccountPassword.ps1
Securely reset local account or the local Administrator account (RID 500) passwords
# Reset-LocalAccountPassword.ps1
# Written by Bill Stewart (bstewart@iname.com)
#requires -version 2
# Version history:
# 1.3 (2019-11-01)
# Correct code formatting.
# 1.2 (2019-09-10)
@jcoffi
jcoffi / aws-transfer-sftp.yaml
Created May 1, 2020 00:29 — forked from niralaakkan/aws-transfer-sftp.yaml
CloudFormation template for AWS Transfer for SFTP
---
AWSTemplateFormatVersion: '2010-09-09'
Description: some-sftp-server
Parameters:
HostedZoneIdParam:
Type: String
Description: Hosted Zone ID
SFTPHostnameParam:
Type: String
@jcoffi
jcoffi / windows_hardening.cmd
Created April 18, 2020 16:14 — forked from jaredhaight/windows_hardening.cmd
Script to perform some hardening of Windows OS.
::
::#######################################################################
::
:: Change file associations to protect against common ransomware attacks
:: Note that if you legitimately use these extensions, like .bat, you will now need to execute them manually from cmd or powershell
:: Alternatively, you can right-click on them and hit 'Run as Administrator' but ensure it's a script you want to run :)
:: ---------------------
ftype htafile="%SystemRoot%\system32\NOTEPAD.EXE" "%1"
ftype WSHFile="%SystemRoot%\system32\NOTEPAD.EXE" "%1"
ftype batfile="%SystemRoot%\system32\NOTEPAD.EXE" "%1"
@jcoffi
jcoffi / SamlJitHandler.java
Created June 28, 2019 21:10 — forked from johndstein/SamlJitHandler.java
Salesforce SAML JIT Handler
// This class provides logic for inbound just-in-time provisioning of single
// sign-on users in your Salesforce organization.
// Here's all the info we're going to have.
//
// Employee Id
// First Name
// Last Name
// Email
// Active Flag
Import-Module -Name D:\Temp\ACME-posh\ACMEPowerShell.psd1
$domain = "mydomain.com"
$certificiatePassword = "abcd1234"
$email = "letsencrypt@mydomain.com"
$vault = "D:\Vault\{0}\{1}" -f $domain, [guid]::NewGuid()
mkdir $vault
cd $vault
Initialize-ACMEVault -BaseURI https://acme-v01.api.letsencrypt.org/
New-ACMERegistration -Contacts mailto:$email