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
#!/usr/bin/env bash | |
die() { | |
notify-send "${NOTIFICATION_SUMMARY}" "${1}" -i audio-volume-muted -t 3000 | |
exit 1 | |
} | |
config_path="${XDG_CONFIG_HOME:-$HOME/.config}/switch-sink.conf.bash" | |
[[ -f ${config_path} ]] || die 'Config not found' | |
# shellcheck disable=SC1090 |
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 | |
INTEGRATED='pci-0000_0c_00.4' | |
VIDEOCARD='pci-0000_0a_00.1' | |
TRAY_APP='volumeicon' | |
NOTIFICATION_SUMMARY='Audio Output' | |
die() { |
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
ARG python_version | |
FROM python:${python_version}-alpine AS base | |
FROM base AS builder | |
COPY requirements.txt /tmp/ | |
RUN pip install --target=/tmp/build --no-deps -r /tmp/requirements.txt | |
FROM base | |
ARG python_version | |
WORKDIR /opt/project/ |
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
/* @namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); */ | |
/* hide the native tabs */ | |
#main-window:not([privatebrowsingmode]) #TabsToolbar { | |
visibility: collapse; | |
} | |
/* hide the sidebar header */ |
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
local tcp_sock_mt = getmetatable(ngx.socket.tcp()) | |
local udp_sock_mt = getmetatable(ngx.socket.udp()) | |
local is_socket_object = function(obj) | |
local obj_mt = getmetatable(obj) | |
return obj_mt == tcp_sock_mt or obj_mt == udp_sock_mt | |
end | |
-------- |
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 | |
ON='{"full_text": "", "color": "#00ff00"}' | |
OFF='{"full_text": "", "color": "#ff0000"}' | |
dbus-send --system \ | |
--print-reply \ | |
--dest=org.freedesktop.NetworkManager \ | |
/org/freedesktop/NetworkManager \ | |
org.freedesktop.DBus.Properties.Get \ |
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
local luaversion = function() | |
if ({false, [1] = true})[1] then -- luacheck: ignore 314 | |
return 'LuaJIT' | |
elseif 1 / 0 == 1 / '-0' then | |
return 0 + '0' .. '' == '0' and 'Lua 5.4' or 'Lua 5.3' | |
end | |
local f = function() return function() end end | |
return f() == f() and 'Lua 5.2' or 'Lua 5.1' | |
end |
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 | |
curl https://en.wikipedia.org/w/api.php -F format=json -F action=parse -F contentmodel=wikitext -F text='<-' 2> /dev/null | jq -r '.parse.text["*"]' |
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
package = "lua-cmsgpack" | |
version = "0.4.0-0" | |
source = { | |
url = "git://github.com/antirez/lua-cmsgpack.git", | |
tag = "0.4.0" | |
} | |
description = { | |
summary = "MessagePack C implementation and bindings for Lua 5.1/5.2/5.3", | |
homepage = "http://github.com/antirez/lua-cmsgpack", | |
license = "Two-clause BSD", |
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
#compdef _just just | |
#autoload | |
_just() { | |
local -a subcmds | |
subcmds=($(just --summary)) 2> /dev/null || return 1 | |
_describe 'command' subcmds | |
} |
NewerOlder