Skip to content

Instantly share code, notes, and snippets.

View aodag's full-sized avatar

Atsushi Odagiri aodag

View GitHub Profile
@aodag
aodag / index.html
Created June 3, 2023 03:05
css遊び
<!DOCTYPE html>
<html>
<style>
body {
width: 100%;
}
.btn-container {
width: 60%;
margin-left: auto;
margin-right: auto;
@aodag
aodag / Dockerfile
Created April 5, 2023 23:37
swayコンポジタをヘッドレスで立ち上げてwayvnc経由で接続可能にするやつ
FROM debian:bookworm
ARG USERNAME=user
ARG GROUPNAME=user
ARG UID=1000
ARG GID=1000
RUN groupadd -g $GID $GROUPNAME && \
useradd -m -s /bin/bash -u $UID -g $GID $USERNAME
COPY ./install.sh /usr/local/bin
@aodag
aodag / opencode
Last active March 30, 2023 07:33
swayでvs codeを開くときにwofi(dmenu mode)でghq管理下のプロジェクトを選択するやつ
#!/bin/sh
workspace=$(ghq list -p | wofi -di)
if [ -n "$workspace" ] ; then
swaymsg exec "code $workspace"
fi
#!/bin/bash
MPC=/usr/bin/mpc
CMD=/usr/bin/fzf
artist=$($MPC ls -f %artist% | sort | uniq | $CMD)
album=$($MPC search -f %album% artist "$artist" | sort | uniq | $CMD)
$MPC search -f %file% artist "$artist" album "$album" | $MPC add
$MPC play
@aodag
aodag / person.py
Created July 21, 2018 12:12
typing, attrs and sqlalchemy
from typing import Optional
import attr
from sqlalchemy import (
Table,
MetaData,
Column,
Unicode,
Integer,
create_engine,
ForeignKey,
title author date tags
なんか書く
aodag
2022-05-10
a
b

最初のセクション

@aodag
aodag / v.md
Last active April 2, 2022 07:45

Hello

🧑‍🤝‍🧑
5
1
b'\xf0\x9f\xa7\x91\xe2\x80\x8d\xf0\x9f\xa4\x9d\xe2\x80\x8d\xf0\x9f\xa7\x91'
[('🧑', 'ADULT'), ('\u200d', 'ZERO WIDTH JOINER'), ('🤝', 'HANDSHAKE'), ('\u200d', 'ZERO WIDTH JOINER'), ('🧑', 'ADULT')]
@aodag
aodag / mpdplaylist.sh
Created December 26, 2021 07:19
select playlist and play mpd
#!/bin/sh
playlist=$(mpc lsplaylist | wofi -d)
if [ -n "$playlist" ] ; then
mpc clear
mpc load "$playlist"
mpc play
fi
@aodag
aodag / _.py
Created March 23, 2019 08:51
dataclasses と sqlalchemy
from datetime import datetime
from typing import Type, TypeVar, Generic
from sqlalchemy import (
create_engine,
MetaData,
Integer,
Unicode,
DateTime,
Column,
Table,