Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
:D

Oliver Salzburg oliversalzburg

💭
:D
View GitHub Profile
View GHXXXX.test.ts
/* eslint-disable comma-dangle */
/* eslint-disable padded-blocks */
/* eslint-disable @typescript-eslint/quotes */
import { Collection, Entity, IdentifiedReference, ManyToOne, MikroORM, OneToMany, OneToOne, PrimaryKey, Reference } from '@mikro-orm/core';
import { PostgreSqlDriver } from '@mikro-orm/postgresql';
import { v4 as uuidv4 } from 'uuid';
@Entity()
export class Session {
@PrimaryKey()
View email_forwarder.tf
locals {
domain_name_reverse = join( "-", reverse( split( ".", var.domain_name ) ) )
name_bucket = "${var.aws_region_ses}-${var.instance_name}-emails-${local.domain_name_reverse}"
}
data "aws_caller_identity" "self" {}
// The mailing domain itself.
resource "aws_ses_domain_identity" "ses_domain_identity" {
provider = aws.ses
View make_data
#!/usr/bin/env bash
while [ ! -e /dev/xvdd ]; do echo Waiting for /dev/xvdd to attach...; sleep 10; done
DEVICE=$(readlink -f /dev/xvdd)
PARTITION=$(readlink -f /dev/xvdd1)
BLKID=$(blkid $PARTITION)
if [[ $BLKID == *" UUID="* ]]; then
echo "Filesystem exists. Good."
PARTITION=$(readlink -f /dev/xvdd1)
else
echo "Filesystem does not exist. Creating..."
@oliversalzburg
oliversalzburg / setBuildNumber.js
Created Mar 13, 2019
Set Cordova build number for Android/iOS
View setBuildNumber.js
#!/usr/bin/env node
const Promise = require( "bluebird" );
const execa = require( "execa" );
const os = require( "os" );
const path = require( "path" );
const replace = require( "replace" );
function setBuildNumberIos( context ) {
@oliversalzburg
oliversalzburg / setVersion.js
Created Mar 13, 2019
Set Cordova config.xml version
View setVersion.js
#!/usr/bin/env node
const Promise = require( "bluebird" );
const path = require( "path" );
const replace = require( "replace" );
function setVersion( context ) {
const packageJson = path.resolve( context.opts.projectRoot, "package.json" );
const packageMeta = require( packageJson );
View spodr-install-cordova-coho-checkout.log
2018-11-20 21:45:21.029 [INFO ] (app) Installing dependencies…
2018-11-20 21:45:21.038 [INFO ] (task.install) Considering 54 projects.
2018-11-20 21:45:21.041 [NOTICE] ( treeNode) Replacing dependency in 'cordova-android@8.0.0-dev' on 'cordova-common@^3.0.0' with root package 'cordova-common@3.0.1-dev'.
2018-11-20 21:45:21.041 [NOTICE] ( treeNode) Replacing dependency in 'cordova-app-harness@0.0.1-dev' on 'cordova@latest' with root package 'cordova@8.0.1-dev'.
2018-11-20 21:45:21.041 [NOTICE] ( treeNode) Replacing dependency in 'cordova-browser@5.1.0-dev' on 'cordova-common@^3.0.0' with root package 'cordova-common@3.0.1-dev'.
2018-11-20 21:45:21.041 [NOTICE] ( treeNode) Replacing dependency in 'cordova-browser@5.1.0-dev' on 'cordova-serve@^2.0.0' with root package 'cordova-serve@2.0.2-dev'.
2018-11-20 21:45:21.041 [NOTICE] ( treeNode) Replacing dependency in 'cordova@8.0.1-dev' on 'cordova-common@^2.2.0' with root package 'cordova-common@3.0.1-dev'.
2018-11-20 21:45:21.041 [NOTICE] ( tree
View gist:1729cd5aa5f988a49e4681f5c1b71d4a
λ time spodr install
2018-10-19 13:40:14.796 [INFO ] (app) Installing dependencies…
2018-10-19 13:40:14.802 [INFO ] (task.install) Considering 32 projects.
2018-10-19 13:40:14.809 [NOTICE] (task.install) Downloading stage 0…
2018-10-19 13:40:14.818 [NOTICE] ( downloader) Resolving 265 versions of 228 packages…
2018-10-19 13:40:15.148 [NOTICE] ( downloader) Downloading 'wns@0.5.4-pre'…
2018-10-19 13:40:16.018 [NOTICE] ( downloader) Downloaded 1 of 265 (264 already in cache, 0 failed).
2018-10-19 13:40:16.021 [NOTICE] (task.install) Processing stage 1…
2018-10-19 13:40:16.030 [NOTICE] ( downloader) Resolving 686 versions of 477 packages…
2018-10-19 13:40:16.266 [NOTICE] ( downloader) Downloading 'angular-aria@1.6.10'…
View gist:b1380e16eccebe10b3673cea17e7c030
"ESLint Disable": {
"prefix": "ed",
"body": [
"/* eslint-disable ${1| ,arrow-body-style,camelcase,indent,new-cap,no-empty-function,no-unused-vars,no-useless-escape,promise/avoid-new,promise/catch-or-return,promise/no-callback-in-promise,promise/no-nesting|} */${0}/* eslint-enable $1 */"
],
"description": "Disables the given rule in an area of code"
},
"ESLint Disable Line": {
"prefix": "edl",
"body": [
@oliversalzburg
oliversalzburg / setBuildNumber.js
Created Aug 29, 2018
Set Cordova build numbers through hook
View setBuildNumber.js
#!/usr/bin/env node
const Promise = require( "bluebird" );
const execa = require( "execa" );
const os = require( "os" );
const path = require( "path" );
const replace = require( "replace" );
function setBuildNumberIos( context ) {
View naturalSort.filter.js
angular
.module( "core.common.internationalization" )
.constant( "naturalSort", naturalSort )
.constant( "naturalSortComparator", naturalSortComparator );
// Comparator to be used with the orderBy filter
function naturalSortComparator( a, b ) {
return naturalSort( a.value, b.value );
}