Skip to content

Instantly share code, notes, and snippets.

View njacobs5074's full-sized avatar

Nick Jacobs njacobs5074

View GitHub Profile
@njacobs5074
njacobs5074 / gruvbox-slack-theme.txt
Last active October 26, 2022 10:40
Slack gruvbox theme
#1D2021,#3c3836,#282828,#B8BB26,#32302F,#FBF1C7,#8EC07C,#fb4934,#1D2021,#928374
@njacobs5074
njacobs5074 / main.py
Created October 12, 2019 17:12
Simple Insertion Sort in Python
import random
import sorting
# Color Code -- 2019-10-12
# Create 20 random number from -10 to +10
my_randoms = random.sample(xrange(-10, 11), 20)
print("20 random numbers:")
print(my_randoms)
@njacobs5074
njacobs5074 / BankTransaction.scala
Created October 18, 2016 13:46
Codacy Scala Private Variable Reporting Issue
private case class BankTransaction(transactionType: String, settlementContact: String, settlementAccount: String, date: DateTime, reference: String, lineItems: List[LineItem]) {
private lazy val lineItemsByAccount = lineItems.groupBy(_.accountCode)
private val descriptionByAccount = Map(
"123" -> "123 Fee Amounts",
"456" -> "456 Trade Payable",
"789" -> "789 Fee Tax Amounts",
"012" -> "012 Mark-off Unknown Debits"
)
@njacobs5074
njacobs5074 / RsaOAuth.scala
Created May 5, 2016 14:33
RSA-SHA1 With Optional Client Certificate for SSL OAuth 1.0a for Scala Play
/**
* This class is based in large part on play.api.libs.oauth.OAuth. Unfortunately that class does
* not support sub-classing in any meaningful way.
*/
case class RsaOAuth(info: ServiceInfo, privateKey: Option[PrivateKey] = None,
maybeKeyStore: Option[KeyStore] = None, maybeKeyStorePassword: Option[String] = None,
use10a: Boolean = true) {
protected lazy val oAuthProvider = {