Skip to content

Instantly share code, notes, and snippets.

View haruki7049's full-sized avatar

haruki7049 haruki7049

View GitHub Profile
@haruki7049
haruki7049 / config
Created January 26, 2024 03:37
My tofi's configuration
# FROM https://github.com/philj56/tofi/blob/v0.9.1/themes/dmenu
anchor = top
width = 100%
height = 30
horizontal = true
font-size = 14
prompt-text = " run: "
font = monospace
outline-width = 0
@haruki7049
haruki7049 / alacritty.yml
Created November 14, 2023 07:36
alacritty's config
shell:
# program: "bash"
# program: "nu"
program: "pwsh"
args:
- -NoLogo
font:
size: 14.0
Import-Module PSReadline
Set-PSReadLineOption -EditMode Emacs -BellStyle None
function Prompt {
$username = "$($env:USER)"
$path = "$($executionContext.SessionState.Path.CurrentLocation)"
Write-Host $path -NoNewline -ForeGroundColor blue
Write-Host " $(Get-Date -Format "MM/dd/yyyy HH:mm")" -ForeGroundColor yellow
Write-Host ">" -NoNewline -ForeGroundColor yellow
Import-Module PSReadline
Set-PSReadLineOption -EditMode Emacs
function Prompt {
$username = "$($env:USER)"
$path = "$($executionContext.SessionState.Path.CurrentLocation)"
Write-Host $username -NoNewline -ForeGroundColor blue
Write-Host "`$" -NoNewline -ForeGroundColor green
Write-Host $path -NoNewline -ForeGroundColor DarkMagenta
alarm="aplay ~/any-sound.wav" # 任意のコマンドに変更するが良い!!
d=`date '+%M'`
while sleep 10; do
if [ $d -eq 00 ]; then
$alarm
break
else
echo "not yet..."
fi
@haruki7049
haruki7049 / configuration.nix
Last active March 23, 2023 07:53
動画で使ったNixOSのconfiguration.nix。https://youtu.be/Z8Gx1-bW8rI
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running ‘nixos-help’).
{ config, pkgs, ... }:
{
imports =
[
./hardware-configuration.nix
@haruki7049
haruki7049 / checkMPCstatus.sh
Last active January 29, 2023 08:25
MPCの状態を確認するワンライナー。
#!/bin/sh
clear && while mpc status; do sleep 1 && clear; done
@haruki7049
haruki7049 / Unko.java
Created November 6, 2022 09:54
Unko!?
public class Unko{
public static void main(String[] args){
int i = 1;
if(i == 0){
System.out.println("unko...");
}else{
System.out.println("unko!?");
}
}
@haruki7049
haruki7049 / unko.hs
Created October 20, 2022 00:53
うんこの量が多すぎる!!
unkoJudge :: Double -> String
unkoJudge volume
| volume <= 10.0 = "Too little..."
| volume <= 20.0 = "Uh... OK. It may be safe."
| otherwise = "Oh!! Your unko is very big!!! You are LEGEND!!!"