Browse Source

random stuff

master
Jeffrey Paul 1 year ago
parent
commit
1675072561
6 changed files with 40 additions and 4 deletions
  1. +1
    -1
      bin/nue3.docker
  2. +1
    -1
      bin/unlock-las1
  3. +1
    -1
      bin/unlock-syncpi-alpha
  4. +1
    -1
      bin/unlock-syncpi-bravo
  5. +16
    -0
      misc/tg.py
  6. +20
    -0
      misc/tg2.py

+ 1
- 1
bin/nue3.docker View File

@@ -6,7 +6,7 @@ fi

DOCKER_HOST=unix://$HOME/tmp/docker.sock
if ! docker ps 2>&1 >/dev/null ; then
rm $HOME/tmp/docker.sock
/bin/rm $HOME/tmp/docker.sock
ssh -nNT -L $HOME/tmp/docker.sock:/var/run/docker.sock root@nue3.eeqj.de
fi


+ 1
- 1
bin/unlock-las1 View File

@@ -7,4 +7,4 @@ if [[ ! -e "$KEYFILE" ]]; then
exit 1
fi

gpg -d "$KEYFILE" | ssh root@las1.tor "bash /root/unlock_disks"
gpg -d "$KEYFILE" | ssh root@las1.local "bash /root/unlock_disks"

+ 1
- 1
bin/unlock-syncpi-alpha View File

@@ -7,4 +7,4 @@ if [[ ! -e "$KEYFILE" ]]; then
exit 1
fi

gpg -d "$KEYFILE" | ssh root@syncpi-las1-alpha.tor "bash /root/unlock_disks"
gpg -d "$KEYFILE" | ssh root@syncpi-las1-alpha.local "bash /root/unlock_disks"

+ 1
- 1
bin/unlock-syncpi-bravo View File

@@ -7,4 +7,4 @@ if [[ ! -e "$KEYFILE" ]]; then
exit 1
fi

gpg -d "$KEYFILE" | ssh root@syncpi-las1-bravo.tor "bash /root/unlock_disks"
gpg -d "$KEYFILE" | ssh root@syncpi-las1-bravo.local "bash /root/unlock_disks"

+ 16
- 0
misc/tg.py View File

@@ -0,0 +1,16 @@
#!/usr/bin/env python3
import time
import termgraphics

#g = termgraphics.TermGraphics(mode = termgraphics.MODE_EASCII)
g = termgraphics.TermGraphics()

g.clear()

for x in range(g.shape[0]):
y = int(0.5 * g.shape[1] * ((2*x/g.shape[0]-1)**3 + 1))
g.point((x,y))

g.draw()
time.sleep(0.1)


+ 20
- 0
misc/tg2.py View File

@@ -0,0 +1,20 @@
#!/usr/bin/env python3

import termgraphics
from PIL import Image, ImageOps
import requests
from io import BytesIO
import time

g = termgraphics.TermGraphics()

def get_image(url = 'https://devblogs.nvidia.com/parallelforall/wp-content/uploads/2016/07/cute.jpg'):
response = requests.get(url)
img = Image.open(BytesIO(response.content))
return img

if __name__ == "__main__":
img = get_image().resize((200//2,150//4), Image.NEAREST)
#print(img)
g.image(list(img.getdata()), img.width, img.height, (0, 0), image_type = termgraphics.IMAGE_RGB_2X4)


Loading…
Cancel
Save