Skip to content

Instantly share code, notes, and snippets.

View michellescripts's full-sized avatar

Michelle Bergquist michellescripts

  • Denver, CO
View GitHub Profile
In project:
1. Double check that package.json has a start script
In command line, in PROJECT folder - add Heroku:
2. which heroku
3. heroku create herokuSiteName
4. git remote -v (shows you the heroku remote)
In command line, in PROJECT folder - add DB to Heroku:
5. heroku addons:create heroku-postgresql
#!/usr/bin/env bash
database=${database:-some_database}
user=${user:-$database}
password=${password:-password}
while [ $# -gt 0 ]; do
if [[ $1 == *"--"* ]]; then
v="${1/--/}"
declare $v="$2"
# echo $1 $2 // Optional to see the parameter:value result
fi
#!/usr/bin/env bash
database=${database:-some_database}
test_database=${database:-some_test_database}
user=${user:-$database}
password=${password:-password}
while [ $# -gt 0 ]; do
if [[ $1 == *"--"* ]]; then
v="${1/--/}"
declare $v="$2"
# echo $1 $2 // Optional to see the parameter:value result
@michellescripts
michellescripts / KotlinGenericMaker
Created August 25, 2020 15:08
kotlin maker example for testing
## Make function (create in test directory)
inline fun <reified T> make(): T {
return makeInstanceOfClass(T::class) as T
}
fun makeInstanceOfClass(clazz: KClass<*>): Any? {
val primitive = makePrimitiveOrNull(clazz)
if (primitive != null) {
return primitive
@michellescripts
michellescripts / bin_check-resource
Created July 29, 2020 19:16
push script: rebase, run tests, git push
#!/usr/bin/env bash
set -xe
pushd ${PROJECT_DIR}
git pull -r && \
./gradlew build && \
git push
popd
@michellescripts
michellescripts / bin_cf-push
Created July 29, 2020 19:14
cf-push script
#!/usr/bin/env bash
set -xe
pushd ${PROJECT_DIR}
CURRENT_SPACE=$(cf target | grep space | cut -d":" -f2 | tr -d '[:space:]')
./gradlew clean build -x test && \
cf push -f cf/manifest.yml -p "./app/build/libs/app-0.0.1-SNAPSHOT.jar" --vars-file "cf/var-files/$CURRENT_SPACE.yml"
popd
@michellescripts
michellescripts / bin_ane-r-u-ok
Created July 29, 2020 19:13
ane-r-u-ok script
#!/usr/bin/env bash
ane && push
@michellescripts
michellescripts / bin_ane
Created July 29, 2020 19:13
ane script
#!/usr/bin/env bash
git commit --amend --no-edit
@michellescripts
michellescripts / gradle&kotlin pretty print tests
Created July 29, 2020 19:10
add to your build.gradle.kts to print your test results in a readable way!
tasks.withType<Test> {
systemProperty("junit.jupiter.execution.parallel.enabled", true)
testLogging {
// set options for log level LIFECYCLE
events(
TestLogEvent.FAILED,
TestLogEvent.PASSED,
TestLogEvent.SKIPPED,
brew install openjdk@11
brew link openjdk@11 --force