This file contains hidden or 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" | |
services: | |
db: | |
image: postgres | |
container_name: db | |
environment: | |
POSTGRES_USER: "${USER}" | |
# POSTGRES_DB: default_db | |
# POSTGRES_PASSWORD: password | |
volumes: |
This file contains hidden or 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
TARGET = alacritty | |
APP_NAME = Alacritty.app | |
ASSETS_DIR = assets | |
RELEASE_DIR = target/release | |
APP_TEMPLATE = $(ASSETS_DIR)/osx/$(APP_NAME) | |
APP_DIR = $(RELEASE_DIR)/osx | |
APP_BINARY = $(RELEASE_DIR)/$(TARGET) | |
APP_BINARY_DIR = $(APP_DIR)/$(APP_NAME)/Contents/MacOS |
This file contains hidden or 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 := $(shell git describe --tags --always --dirty) | |
all: help | |
version: ## Print current version | |
@echo $(VERSION) | |
help: | |
@grep -E '^[a-zA-Z._-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\t\033[36m%-11s\033[0m %s\n", $$1, $$2}' |
This file contains hidden or 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
ignore = W503 | |
max-line-length = 79 | |
max-complexity = 18 | |
select = B,C,E,F,W,T4,B9 |
This file contains hidden or 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
ActiveAdmin.register Model do | |
controller do | |
def scoped_collection | |
# this is super ugly but whatever | |
if (params.keys - ["controller", "action", "order"]).size > 0 | |
super | |
else | |
super.none | |
end | |
end |
This file contains hidden or 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
const obj = {}; | |
const handler = { | |
set(target, key, value) { | |
console.table("Setting", key, value); | |
target[key] = value; | |
}, | |
deleteProperty(target, key) { | |
console.log(`Deleting ${key}`); | |
delete target[key]; | |
}, |
This file contains hidden or 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
# setup OBS camera sink | |
obscam() { | |
if [ ! -d ~/code/v4l2loopback ]; then | |
( | |
cd ~/code | |
git clone [email protected]:umlaeute/v4l2loopback.git | |
cd v4l2loopback | |
make | |
sudo make install | |
sudo depmod -a |
This file contains hidden or 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:void(function(){params=new URLSearchParams(document.location.search.slice(1));params.set("pp","flamegraph");open('https://www.speedscope.app/#profileURL='+encodeURIComponent(`${document.location.origin}${document.location.pathname}?${params.toString()}`))}()) |
This file contains hidden or 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
Show hidden characters
{ | |
// NOTE: these settings work well for me | |
// using Ruby, Elixir and Assembly languages. | |
// | |
// I would probably do something different if | |
// I worked more with other languages at the moment | |
"telemetry.enableCrashReporter": false, | |
"telemetry.enableTelemetry": false, | |
"workbench.startupEditor": "newUntitledFile", |
This file contains hidden or 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 $e(tag='div', props={}, children=[]){ | |
let element = document.createElement(tag); | |
Object.assign(element, props); | |
element.append(...children); | |
return element; | |
} | |
// With `elem.append(...children)` - with the added benefit that plain strings passed to .append() get turned into text nodes automatically, so you probably don't need $t any more. | |
var $t=document.createTextNode.bind(document); |
OlderNewer