Skip to content

Instantly share code, notes, and snippets.

View rynkowsg's full-sized avatar

Greg Rynkowski rynkowsg

View GitHub Profile
@rynkowsg
rynkowsg / 51-android.rules
Last active January 24, 2018 19:13 — forked from jdamcd/51-android.rules
Full set of Android USB vendor ID rules for Linux
SUBSYSTEM=="usb", ATTR{idVendor}=="0409", MODE="0666", GROUP="plugdev" #NEC
SUBSYSTEM=="usb", ATTR{idVendor}=="0414", MODE="0666", GROUP="plugdev" #Gigabyte
SUBSYSTEM=="usb", ATTR{idVendor}=="0471", MODE="0666", GROUP="plugdev" #Philips
SUBSYSTEM=="usb", ATTR{idVendor}=="0482", MODE="0666", GROUP="plugdev" #Kyocera
SUBSYSTEM=="usb", ATTR{idVendor}=="0489", MODE="0666", GROUP="plugdev" #Foxconn
SUBSYSTEM=="usb", ATTR{idVendor}=="04c5", MODE="0666", GROUP="plugdev" #Fujitsu
SUBSYSTEM=="usb", ATTR{idVendor}=="04da", MODE="0666", GROUP="plugdev" #PMC-Sierra
SUBSYSTEM=="usb", ATTR{idVendor}=="04dd", MODE="0666", GROUP="plugdev" #Sharp
SUBSYSTEM=="usb", ATTR{idVendor}=="04e8", MODE="0666", GROUP="plugdev" #Samsung
SUBSYSTEM=="usb", ATTR{idVendor}=="0502", MODE="0666", GROUP="plugdev" #Acer
@rynkowsg
rynkowsg / gist:664c7c314b9bd01d7d6662b0790a8a3a
Created April 24, 2019 13:25 — forked from telent/gist:9742059
12 factor app configuration vs leaking environment variables
App configuration in environment variables: for and against
For (some of these as per the 12 factor principles)
1) they are are easy to change between deploys without changing any code
2) unlike config files, there is little chance of them being checked
into the code repo accidentally
3) unlike custom config files, or other config mechanisms such as Java
@rynkowsg
rynkowsg / dependencies.kt
Last active November 23, 2020 08:19
dependencies.kt
// ktlint-disable max-line-length
@file:Suppress("unused", "MemberVisibilityCanBePrivate")
package buildsrc
// Alternative how to define dependencies:
// https://github.com/ProteGO-Safe/android/blob/76a96eb9801b8cd9c83f4f221982cc5a93891eea/dependencies.gradle
import org.gradle.api.JavaVersion
@rynkowsg
rynkowsg / non-interactive-gpg.sh
Last active June 27, 2021 15:24
Example of non-interactive GPG
#!/usr/bin/env bash
# shellcheck disable=SC2155
RED=$(printf '\033[31m')
GREEN=$(printf '\033[32m')
YELLOW=$(printf '\033[33m')
BLUE=$(printf '\033[34m')
BOLD=$(printf '\033[1m')
RESET=$(printf '\033[m')
@rynkowsg
rynkowsg / colors.sh
Created June 19, 2021 23:36
Shell colors
#!/usr/bin/env sh
RED=$(printf '\033[31m')
GREEN=$(printf '\033[32m')
YELLOW=$(printf '\033[33m')
BLUE=$(printf '\033[34m')
BOLD=$(printf '\033[1m')
RESET=$(printf '\033[m')
@rynkowsg
rynkowsg / .gitattributes
Created October 16, 2021 23:36
.gitattributes for Git LFS
#################################################
#### audio files
*.m4a filter=lfs diff=lfs merge=lfs -text
*.mp3 filter=lfs diff=lfs merge=lfs -text
*.ogg filter=lfs diff=lfs merge=lfs -text
*.wav filter=lfs diff=lfs merge=lfs -text
### audio editor files
#*.aup filter=lfs diff=lfs merge=lfs -text
*.au filter=lfs diff=lfs merge=lfs -text
#################################################
@rynkowsg
rynkowsg / atom_db.cljc
Last active December 20, 2022 13:47
Atom DB with nav support
(ns atom-db
(:require
[clojure.core.protocols :as ccp]
[clojure.datafy :as cd]))
(defn init-db []
(atom {}))
(defn- navigify [db path]
(vary-meta
@rynkowsg
rynkowsg / .gitattributes
Last active December 25, 2022 18:39
.gitattributes for Git LFS
#################################################
#### audio files
*.m4a filter=lfs diff=lfs merge=lfs -text
*.mp3 filter=lfs diff=lfs merge=lfs -text
*.ogg filter=lfs diff=lfs merge=lfs -text
*.wav filter=lfs diff=lfs merge=lfs -text
### audio editor files
#*.aup filter=lfs diff=lfs merge=lfs -text
*.au filter=lfs diff=lfs merge=lfs -text
#################################################
#!/usr/bin/env bash
yes_or_no() {
while true; do
printf "%s [y/n]: " "$*"
read -r yn
case $yn in
[Yy]*) return 0 ;;
[Nn]*) return 1 ;;
esac
// Avenir
@font-face {
font-family: "Avenir";
font-weight: 800;
src: url(#{$font-url + "/Avenir/Avenir-Black.ttf"}) format("truetype");
}
@font-face {
font-family: "Avenir";