Skip to content

Instantly share code, notes, and snippets.

View orhun's full-sized avatar
:shipit:
I don't have a rat under my hat

Orhun Parmaksız orhun

:shipit:
I don't have a rat under my hat
View GitHub Profile
@christianparpart
christianparpart / terminal-synchronized-output.md
Last active May 7, 2025 07:11
Terminal Spec: Synchronized Output

Synchronized Output

Synchronized output is merely implementing the feature as inspired by iTerm2 synchronized output, except that it's not using the rare DCS but rather the well known SM ? and RM ?. iTerm2 has now also adopted to use the new syntax instead of using DCS.

Semantics

When rendering the screen of the terminal, the Emulator usually iterates through each visible grid cell and renders its current state. With applications updating the screen a at higher frequency this can cause tearing.

This mode attempts to mitigate that.

@binji
binji / LICENSE
Last active January 9, 2025 20:55
pokegb.cc w/o macros
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
@giuliano-macedo
giuliano-macedo / download_file.rs
Last active October 25, 2024 17:13
Download large files in rust with progress bar using reqwest, future_util and indicatif
// you need this in your cargo.toml
// reqwest = { version = "0.11.3", features = ["stream"] }
// futures-util = "0.3.14"
// indicatif = "0.15.0"
use std::cmp::min;
use std::fs::File;
use std::io::Write;
use reqwest::Client;
use indicatif::{ProgressBar, ProgressStyle};
@clickwir
clickwir / cool.sh
Last active April 10, 2021 20:18 — forked from orhun/cool.sh
Random MOD player
#!/usr/bin/env bash
# Get a random music file from modarchive.org and play it.
# Uses VLC. Many other players could work too.
# Check for needed programs. Exit if they are not found.
#if ! which xmp > /dev/null; then echo "xmp not installed. Try: apt install xmp"; exit 1; fi
if ! which vlc > /dev/null; then echo "VLC not installed. Try: apt install vlc"; exit 1; fi
if ! which curl > /dev/null; then echo "curl not installed. Try: apt install curl"; exit 1; fi
# Check if the user wants a specific module
@vaibhav93
vaibhav93 / auto_brightness.py
Last active August 11, 2020 23:16
Adjust brightness when switching to chrome workspace in i3
import i3ipc
import os
SET_BRIGHTNESS = 'xbacklight -set '
GET_BRIGHTNESS = 'xbacklight'
i3 = i3ipc.Connection()
class BrightnessController:
def __init__(self):
self.brightness_map = {}
@haxpor
haxpor / assert.c
Created November 3, 2018 19:27
Example of assert.c with -DNDEBUG compile flag. Try to compile with `gcc -DNDEBUG assert.c` and `gcc assert.c` to see differences.
#include <stdio.h>
#include <assert.h>
int main(int argc, char* argv[])
{
int a = 10;
assert(a != 10);
printf("end of program\n");
return 0;
}
@fnky
fnky / ANSI.md
Last active May 10, 2025 11:07
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
# Installation on Dell XPS 9570
# Connect to Internet
wifi-menu
# Sync clock
timedatectl set-ntp true
# Create three partitions:
@krisleech
krisleech / renew-gpgkey.md
Last active May 8, 2025 01:22
Renew Expired GPG key

Renew GPG key

Given that your key has expired.

$ gpg --list-keys
$ gpg --edit-key KEYID

Use the expire command to set a new expire date:

@josephg
josephg / README.md
Last active June 7, 2024 09:37
Getting Zig compiling to WASM

In case anyone else wants to play with Zig on webassembly, here's what you need to do to make it work on a mac today.

1. Get LLVM 7 compiled with webassembly support.

You'll need LLVM to output to the WASM target. This has just been added by default in trunk, so if LLVM >7 is available, you might be able to just brew install llvm.

If you have wasm support already you should see:

$ llc --version