Skip to content

Instantly share code, notes, and snippets.

View markhaehnel's full-sized avatar

Mark Hähnel markhaehnel

View GitHub Profile
@markhaehnel
markhaehnel / index.js
Created February 24, 2022 08:45
feathers-elasticsearch id field
const feathers = require('@feathersjs/feathers');
const app = feathers();
const Elastic = require("feathers-elasticsearch");
const elasticsearch = require('@elastic/elasticsearch');
app.use('elastic', new Elastic({
id: "route",
Model: new elasticsearch.Client({
nodes: [
'http://localhost:9200',
@markhaehnel
markhaehnel / Brewfile
Last active April 8, 2022 07:12
Brewfile
brew "gh"
brew "curl"
brew "tokei"
brew "git"
brew "jq"
brew "tree"
brew "git-delta"
brew "exa"
brew "fd"
brew "bat"
@markhaehnel
markhaehnel / git-version.gradle
Last active August 31, 2020 09:29
Git Version for Gradle builds
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'org.ajoberstar.grgit:grgit-gradle:3.0.0'
}
}
import org.ajoberstar.grgit.Grgit
@markhaehnel
markhaehnel / flutter_build.ps1
Last active May 4, 2020 06:21
Flutter build scripts (with version from Git)
#!/usr/bin/env pwsh
# Get version information from git
$VERSION_NAME=(git describe)
$VERSION_CODE=(git rev-list --all --count)
# Check git version validity
if (([string]::IsNullOrEmpty($VERSION_NAME)) -or ([string]::IsNullOrEmpty($VERSION_CODE))) {
Write-Output "VERSION_NAME or VERSION_CODE is empty. There must be at least one git commit and one git tag."
exit 1
@markhaehnel
markhaehnel / visibility.css
Created August 24, 2016 13:52
Visibility classes based on media width
@-ms-viewport {
width: device-width
}
.visible-lg,
.visible-lg-block,
.visible-lg-inline,
.visible-lg-inline-block,
.visible-md,
.visible-md-block,