echo "https://api.ipify.org"
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
defmodule Sqrt do | |
def sqrtiter(guess, x) do | |
if (goodenought?(guess, x)) do | |
guess | |
else | |
guess | |
|> improve(x) | |
|> sqrtiter(x) | |
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
#!elixir | |
case System.argv() do | |
["up"] -> | |
"nmcli connection up work" | |
|> String.to_charlist() | |
|> :os.cmd() | |
|> List.to_string() | |
|> String.trim() | |
|> IO.puts() |
pactl set-sink-port alsa_output.pci-0000_09_00.4.analog-stereo analog-output-headphones
pactl set-sink-port alsa_output.pci-0000_09_00.4.analog-stereo analog-output-lineout
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
localectl set-x11-keymap us pc105 intl |
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/elixir | |
System.argv() | |
|> case do | |
["up"] -> | |
System.cmd("nmcli", ["connection", "up", "work"]) | |
|> IO.inspect() | |
["down"] -> | |
System.cmd("nmcli", ["connection", "down", "work"]) |
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/bash | |
# pacman -S dnsutils | |
dig TXT +short o-o.myaddr.l.google.com @ns1.google.com | |
dig +short txt ch whoami.cloudflare @1.0.0.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
# interactive command | |
gpg2 --full-generate-key | |
# get keyID | |
gpg2 --list-secret-keys --keyid-format=long | |
att .gitconfig with KEYID | |
`git config --global user.signingkey 3AA5C34371567BD2` |