Skip to content

Instantly share code, notes, and snippets.

View saylerb's full-sized avatar

Brian Sayler saylerb

  • Denver, CO
View GitHub Profile
@saylerb
saylerb / reified-types.md
Last active December 14, 2019 16:54
Kotlin reified-types

Reified-types

Normally, you can't pass a generic type to a function and access it as if it were a class. This is because of type erasure: generic types are erased at compile time and aren't normally accessible at runtime.

fun <T> deserializeObject(json: String): T {
      val mapper = jacksonObjectMapper()
 
@saylerb
saylerb / annotation_processing.md
Created July 7, 2019 20:27
Annotation Processing Setup

Install Lombok

  • Go to "Plugins" and Install Lombok

  • Go to "Build, Execution, and Deployement" -> Compiler -> Annotation Processors -> Check the "Enable annotation processing" box

@saylerb
saylerb / git-setup.sh
Created March 18, 2019 18:22 — forked from patik/git-setup.sh
Git and Node with Zscaler proxy
#!/bin/sh
# Git proxy settings
echo "Configuring Git..."
git config --global http.proxy http://gateway.zscaler.net:80/
git config --system http.proxy http://gateway.zscaler.net:80/
git config --global http.sslVerify false
git config --system http.sslVerify false
git config --global --unset http.sslcainfo
git config --system --unset http.sslcainfo
import React from 'react';
import {mount} from 'enzyme';
import {createReduxStore} from '../../../store';
import GrindingYieldModelForm from '../grindingYieldModelForm';
import {Provider} from 'react-redux';
import semanticUI from '../../../../test-helpers/semantic-ui';
import GrindingYieldModelFactory from '../../../../test-factories/grindingYieldModel';
import {getProduct} from '../../../shared/components/product/actionsDuplicate';
import {createGrindingYieldModel, showPricingModelConfirmation, clearYieldModelInfo} from '../../actions/yieldModelActions';
@saylerb
saylerb / intellij_setup_gradle_project.md
Last active August 2, 2018 00:51
Intellij CE setup a Gradle project

Install IntelliJ CE

  • Download IntelliJ Community Edition and copy to Applications folder
  • Open, don't import any settings.
  • You can skip the rest of the initial configuration process

Make sure you have Java Installed

@saylerb
saylerb / bootstrap_mac.sh
Last active June 8, 2021 19:16
A bash script to install ansible dependencies
# !/usr/bin/env bash
# sudo pip install --upgrade -r requirements.txt
# Install Command Line Tools, required for pip to install ansible
touch /tmp/.com.apple.dt.CommandLineTools.installondemand.in-progress;
PROD=$(softwareupdate -l |
grep "\*.*Command Line" |
head -n 1 | awk -F"*" '{print $2}' |
sed -e 's/^ *//' |

Installation instructions

  • Change system password to anything that is not blank. e.g. "bgc"

Install homebrew:

 ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
  1. Who checked out the book 'The Hobbit’?

Query:

SELECT name FROM member
JOIN checkout_item on checkout_item.member_id = member.id
JOIN book on checkout_item.book_id = book.id
WHERE book.title = "The Hobbit";
@saylerb
saylerb / readmelove.md
Created September 19, 2016 16:55 — forked from rrgayhart/readmelove.md
README Love

##PROTIP: README Love

READMEs are AWESOME. They are one of the best things you can add to a repo, (other than quality code), to make it look professional.

####Things that make a README great:

  • A link to the production site on heroku
  • A screenshot (or a few) of what the app does (This is especially important if you don't have the production app up and running yet)
  • Directions on how to clone or fork the repo and run it locally (explain it like you're explaining things to a totally new programmer)