Skip to content

Instantly share code, notes, and snippets.

View ikr7's full-sized avatar
🅰️
rch Linux

ikr7

🅰️
rch Linux
View GitHub Profile
@ikr7
ikr7 / sixel-mandelbrot.py
Last active October 17, 2021 16:52
Draws mandelbrot fractal on sixel-enabled terminal. Worked on @ayosec 's fork of alacritty ( https://github.com/ayosec/alacritty/tree/graphics )
"""
usage:
$ python sixel-mandelbrot.py
or
$ python sixel-mandelbrot.py 300
"""
import sys
import fcntl, termios, struct
@ikr7
ikr7 / vigenere.py
Last active June 27, 2021 14:17
Vigenère cipher analyzer for puzzle 04-03 of Cypher ( https://store.steampowered.com/app/746710/Cypher )
import sys
key = sys.argv[1]
cipher = input()
print(f'{key = !r}')
print(f'{cipher = !r}')
print()
A = ord('A')
@ikr7
ikr7 / keybase.md
Created December 18, 2020 06:24
keybase.md

Keybase proof

I hereby claim:

  • I am ikr7 on github.
  • I am ikr7 (https://keybase.io/ikr7) on keybase.
  • I have a public key whose fingerprint is 9CB9 55E6 6179 0DC1 424D 0798 93E3 2CF4 EBFC 9881

To claim this, I am signing this object:

@ikr7
ikr7 / index.html
Created January 8, 2019 12:29
vtwi
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>vtwi</title>
<style>
label {
display: block;
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<title>Population Pyramid Simulation</title>
<style media="screen">
body {
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
position: relative;
@ikr7
ikr7 / main.cpp
Created December 10, 2018 02:27
#define STB_IMAGE_WRITE_IMPLEMENTATION
#include <cstdio>
#include <iostream>
#include <vector>
#include <complex>
#include "stb_image.h"
#include "stb_image_write.h"
@ikr7
ikr7 / index.html
Created December 10, 2018 01:36
Synchronization Phenomena
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<title>Boid Simulation</title>
<style media="screen">
body {
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
position: relative;
@ikr7
ikr7 / tlc.v
Last active February 2, 2020 03:31
Typed Lambda Calculus
Require Import List.
Inductive Error : Set :=
| NotImplemented : Error
| NotDeclared : Error
| NotApplicable : Error
| NotExpectedType : Error
| SomethingWrong : Error
.
@ikr7
ikr7 / wifi.sh
Last active October 20, 2018 04:03
#!/bin/bash
IFNAME="wlp36s0"
if [ "$1" = "off" ]; then
nmcli device disconnect $IFNAME
exit 0
fi
if [ "$1" = "on" ]; then
@ikr7
ikr7 / complex.glsl
Last active March 20, 2021 06:08
Complex functions for GLSL (Note: not very optimized)
// absolute value of z (equivalent of built-in function `length`)
float cabs (vec2 z) {
return length(z);
}
// complex conjugate of z
vec2 cconj (vec2 z) {
return vec2(z.x, -z.y);
}