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
version: "3.8" | |
networks: | |
app_local: | |
driver: bridge | |
services: | |
redis: | |
deploy: | |
mode: global |
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
function docker() { | |
# source: https://github.com/moby/moby/issues/33673#issuecomment-817117924 | |
if [ "$1" = "service" ] && [ "$2" = "logs" ]; then | |
shift 2 | |
args=() | |
follow= | |
for arg in "$@"; do | |
if [ "$arg" = "-f" ] || [ "$arg" = "--follow" ]; then follow=1 | |
else args+=( "$arg" ) | |
fi |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
{ cmake | |
, fetchFromGitHub | |
, pkg-config | |
, stdenv | |
, wxGTK31 | |
}: | |
let | |
wxGTK = wxGTK31; | |
in | |
stdenv.mkDerivation (finalAttrs: rec { |
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/sh | |
# Usage: `slurp_align <divisor>`, e.g. `slurp_align 2` will align slurp width + height to multiple of 2 | |
slurp_align() { | |
slurp | awk "{split(\$0, loc_size); split(loc_size[2], size, \"x\"); print loc_size[1] \" \" (size[1] - (size[1] % ${1:-1})) \"x\" (size[2] - (size[2] % ${1:-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
from functools import partial | |
from celery.app.task import Task | |
from celery.app.utils import find_app | |
class CeleryTestTask(object): | |
"""A context manager to patch task in order to queue delayed tasks | |
and eventually run them. This is for tests. |
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
CREATE OR REPLACE FUNCTION jsonb_set_deep(target jsonb, path text[], val jsonb) | |
RETURNS jsonb AS $$ | |
DECLARE | |
k text; | |
p text[]; | |
BEGIN | |
IF (path = '{}') THEN | |
RETURN val; | |
ELSE | |
IF (target IS NULL) THEN |
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
javascript:(function(){document.head.appendChild(document.createElement("style")).innerHTML='#docs-presence-container,%20g[clip-path=%22url(#punch-page-filmstrip-thumbnail-collaborator-clip-path)%22]{display:%20none%20!important;}'})(); |
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
use flake | |
NODE_DIR="${PWD}/.direnv/node" | |
NODE_MODULES_DIR="${PWD}/node_modules" | |
export NODE_OPTIONS="--max_old_space_size=65536" | |
export NODE_PATH="${NODE_DIR}:${NODE_MODULES_DIR}" | |
export NPM_CONFIG_PREFIX="${NODE_DIR}" | |
export PATH="${NODE_DIR}/bin:${NODE_MODULES_DIR}/.bin:${PATH}" |
NewerOlder