Skip to content

Instantly share code, notes, and snippets.

@zba
zba / config.kdl
Created April 21, 2025 10:33
simple zellij LOCKED config, support ctrl+a and atacking with ctrl+a,a,... (^a,a,d for example)
// simple zellij LOCKED config, support ctrl+a and atacking with ctrl+a,a,... (^a,a,d for example)
// (if you ssh to tmux or zellij or screen with ctrl+a binings)
// name as ~/.config/zellij/config.kdl
keybinds clear-defaults=true {
locked {
bind "Ctrl a" { SwitchToMode "normal"; }
}
normal {
bind "a" { Write 0x01; SwitchToMode "locked"; }
@zba
zba / runZellijSession.sh
Last active April 21, 2025 10:28
run zellij session in current dir, with own autoupdated HISTFILE, good for run in vscode with ctrl+a unlocks
#!/bin/bash
#name as ~/bin/runZellijSession.sh
session_name=$(echo $PWD|sed "s/\\//_/g")_
hist_path="$HOME/.config/zellij/bash_histories"
mkdir -p $hist_path
old_hist_file="$HOME/.bash_history"
export HISTFILE="$hist_path/$session_name"
if [ ! -f "$HISTFILE" ]; then
// made to be able to wrap window, in case when Localstorage is unavailable
function copy(object) {
try {
return Object.assign({}, object)
} catch(e) {
const result = {};
Object.keys(object).forEach(key=> {
let value;
try {
value = object[key];
@zba
zba / Dockerfile
Created July 28, 2014 01:36
mysql docker
FROM centos:centos6
#FROM ubuntu
RUN yum install -y mysql-server
ADD mysql-entry.pl /entrypoint.pl
ENTRYPOINT ["/entrypoint.pl"]
<div id="test">test</div>
@zba
zba / output
Last active December 14, 2015 03:38
perl sleep test
$ time ./test.sh
real 0m6.020s
user 0m0.004s
sys 0m0.008s
@zba
zba / test.html
Last active December 13, 2015 18:08
<html>
<body>
<iframe src="test2.html"></iframe>
</body>
</html>
@zba
zba / fiddle.response.html
Created February 14, 2013 13:26
iframe for jsfiddle
<html>
<head>
</head>
<body>
<div> Hello from iframe!</div>
</body>
</html>
@zba
zba / gist:4770239
Created February 12, 2013 14:32
simple js
alert('loaded');
function run() {
alert ('run fired');
}
@zba
zba / fiddle.response.html
Last active December 12, 2015 09:08
html sample for fiddle
<html>
<body>
<h1 id="helloworld">Hello world</h1>
other content
</body>
</html>