Movatterモバイル変換


[0]ホーム

URL:


Skip to content
Search Gists
Sign in Sign up

Instantly share code, notes, and snippets.

View ku1ik's full-sized avatar
👋

Marcin Kulik ku1ik

👋
Software engineer, consultant, specializing in Elixir and Rust. Creator of@asciinema.
View GitHub Profile

I hereby claim:

  • I am ku1ik on github.
  • I am sickill (https://keybase.io/sickill) on keybase.
  • I have a public key ASA6zv4rQRzFiEbKAPOiFfmc4rJOYHKCXOZ9V-3cfwFatgo

To claim this, I am signing this object:

0x00 - NUL - Null character, used as a string terminator in some programming languages
0x01 - SOH - Start of Header, indicates the start of a message in communication protocols
0x02 - STX - Start of Text, marks the end of the transmission header and the beginning of the message
0x03 - ETX - End of Text, signifies the end of a message
0x04 - EOT - End of Transmission, marks the end of a message or series of messages
0x05 - ENQ - Enquiry, requests an acknowledgement from the receiver in communication protocols
0x06 - ACK - Acknowledge, confirms receipt of a message in communication protocols
0x07 - BEL - Bell, triggers an audible bell or alert on a device
0x08 - BS - Backspace, moves the cursor back one space in text processing
0x09 - HT - Horizontal Tab, moves the cursor to the next tab stop in text processing

Following will teach you how to play the "easter-egg" (which actually isn't, but many people describe this as an easter egg) of ASCII-Art Star Wars (or Star Wars in terminal/telnet, whatever), the one you normally starts like this:

$ telnet towel.blinkenlights.nl
  1. Before you start, ensureNode.js is installed.
  2. Navigate towww.asciimation.co.nz, the original home of that ASCII-Art Star Wars.
  3. Press F12 to open developer tools.
@ku1ik
ku1ik /proxmox_resize_pve-root
CreatedMarch 20, 2021 18:11
Proxmox - Resize pve-root
# Check disk space before
df -h
# Delete local-lvm storage in gui
lvremove /dev/pve/data
lvresize -l +100%FREE /dev/pve/root
resize2fs /dev/mapper/pve-root
@ku1ik
ku1ik /script-template.sh
CreatedDecember 27, 2020 18:29— forked fromm-radzikowski/script-template.sh
Minimal safe Bash script template - see the article with full description:https://betterdev.blog/minimal-safe-bash-script-template/
#!/usr/bin/env bash
set -Eeuo pipefail
trap cleanup SIGINT SIGTERM ERR EXIT
script_dir=$(cd"$(dirname"${BASH_SOURCE[0]}")"&>/dev/null&&pwd -P)
usage() {
cat<<EOF
Usage:$(basename"${BASH_SOURCE[0]}") [-h] [-v] [-f] -p param_value arg1 [arg2...]
@ku1ik
ku1ik /collatz.md
Last activeDecember 14, 2019 16:44

I implemented simple (dumb) algorithm for finding the largest Collatz trajectory(seeCollatz conjecture)for all numbers < 100,000,000 in Python, Rust and Elixir.

I benchmarked them withtime command, assuming boot time is negligible(Python and Elixir need ~1 sec to boot before the calculation loop starts but their runtime is in hundreds of seconds anyway.Rust program boots in couple of milliseconds.)

@ku1ik
ku1ik /rw_ro_access.sql
Last activeOctober 16, 2018 11:26— forked fromchecco/rw_ro_access.sql
How to create a read only user in AWS RDS PostgreSQL and a user with superuser privileges on AWS RDS PostgreSQL
--
-- Read only
--
-- Create a group
CREATE ROLE ro_group;
-- Grant access to existing tables
GRANT USAGEON SCHEMA public TO ro_group;
GRANTSELECTON ALL TABLESIN SCHEMA public TO ro_group;
@ku1ik
ku1ik /asciicast-transformations.py
CreatedMarch 6, 2018 18:16
Experiments with asciicast transformations
importsys
importasciinema.asciicastasasciicast
importasciinema.asciicast.eventsasev
# predicates
def_(actual):
returnTrue
importsys
importos
importjson
importasciinema.asciicastasasciicast
importasciinema.asciicast.framesasframes
# run me with:
# python3 edit-asciicast.py original.cast edited.cast
@ku1ik
ku1ik /asciinema-upload.sh
Last activeJanuary 30, 2024 08:26
Upload local recording to asciinema.org with curl
curl -v -u$USER:$(cat~/.config/asciinema/install-id) https://asciinema.org/api/asciicasts -F asciicast=@/path/to/demo.cast
NewerOlder

[8]ページ先頭

©2009-2025 Movatter.jp