This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
blueprint: | |
name: GE Enbrighten Switch Double Taps | |
description: Create automations to react to double taps from supporting GE switches. | |
domain: automation | |
input: | |
device: | |
name: Switch Device | |
description: A GE switch that supports double taps. | |
selector: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class PrintIncludedFilenamesPlugin { | |
apply(compiler) { | |
compiler.plugin('compilation', compilation => { | |
compilation.plugin('after-optimize-chunk-assets', chunks => { | |
for (const chunk of chunks) { | |
for (const module of chunk.getModules()) { | |
if (module.resource) { | |
// further filter files depending on filename or module type | |
console.log(module.resource); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Usage: clone_all_repos.sh [organization] <output directory> | |
# must have jq installed (brew install jq or apt install jq) | |
ORG="lanetix" | |
PER_PAGE=100 | |
GIT_OUTPUT_DIRECTORY=${2:-"."} | |
# Go to https://github.com/settings/tokens and generate a new github token, make sure to give it access to all repo permissions, then paste the token below | |
GITHUB_TOKEN="TOKEN_GOES_HERE" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import DeepProxy from 'proxy-deep' | |
import oboe from 'oboe' | |
const PENDING = Symbol('PENDING') | |
const SUCCESS = Symbol('SUCCESS') | |
const ERROR = Symbol('ERROR') | |
export default function bassoon (...args) { | |
const state = new Map() | |
const oboeRequest = oboe(...args) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export default async function advLock (query, lockId, transaction) { | |
try { | |
await query(`SELECT pg_advisory_lock($1)`, [lockId]) | |
// the `return await` is important, it ensures we await in this function | |
// and catch any errors here so the finally runs AFTER the promise resolves/rejects | |
return await transaction() | |
} finally { | |
// it's really important we don't return here, otherwise we will overwrite | |
// the return value from above |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"table": "video_games", | |
"select": [ | |
"id", | |
"name", | |
"genre" | |
], | |
"filter": { | |
"type": "or", | |
"left": { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Copyright 2019 Danny Nguyen <danny@keeb.io> | |
* Copyright 2019 Gregory Benner <gregbenner1@gmail.com> | |
* | |
* This program is free software: you can redistribute it and/or modify | |
* it under the terms of the GNU General Public License as published by | |
* the Free Software Foundation, either version 2 of the License, or | |
* (at your option) any later version. | |
* | |
* This program is distributed in the hope that it will be useful, | |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# generated by Slic3r Prusa Edition 1.42.0-beta2+win64 on 2019-04-25 at 18:00:51 | |
[filament:Black Hatchbox] | |
bed_temperature = 55 | |
bridge_fan_speed = 100 | |
compatible_printers = | |
compatible_printers_condition = printer_notes=~/.*PRINTER_VENDOR_PRUSA3D.*/ and printer_notes=~/.*PRINTER_MODEL_MK(2.5|3).*/ | |
compatible_prints = | |
compatible_prints_condition = | |
cooling = 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import color from "color"; | |
import { Platform, Dimensions, PixelRatio } from "react-native"; | |
const deviceHeight = Dimensions.get("window").height; | |
const deviceWidth = Dimensions.get("window").width; | |
const platform = Platform.OS; | |
const platformStyle = "material"; | |
const isIphoneX = | |
platform === "ios" && deviceHeight === 812 && deviceWidth === 375; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Your init script | |
# | |
# Atom will evaluate this file each time a new window is opened. It is run | |
# after packages are loaded/activated and after the previous editor state | |
# has been restored. | |
# | |
# An example hack to log to the console when each text editor is saved. | |
# | |
# atom.workspace.observeTextEditors (editor) -> | |
# editor.onDidSave -> |
NewerOlder