Skip to content

Instantly share code, notes, and snippets.

View monakez's full-sized avatar
🤔
I may be slow to respond.

Andrei monakez

🤔
I may be slow to respond.
View GitHub Profile
@monakez
monakez / less
Created December 21, 2022 12:22 — forked from RichardBronosky/less
A vim wrapper that allow you to use it for a pager, man reader, etc.
#!/usr/bin/env bash
set -eu
cache_file="/tmp/pager.cache"
[[ ! -p "$cache_file" ]] && touch "$cache_file" && trap "rm $cache_file" 0
cat > "$cache_file"
vim -R -c "terminal cat $cache_file"
@monakez
monakez / glibc-2.17_centos6.sh
Created March 3, 2022 18:31 — forked from harv/glibc-2.17_centos6.sh
update glibc to 2.17 for CentOS 6
#! /bin/sh
# update glibc to 2.17 for CentOS 6
wget http://copr-be.cloud.fedoraproject.org/results/mosquito/myrepo-el6/epel-6-x86_64/glibc-2.17-55.fc20/glibc-2.17-55.el6.x86_64.rpm
wget http://copr-be.cloud.fedoraproject.org/results/mosquito/myrepo-el6/epel-6-x86_64/glibc-2.17-55.fc20/glibc-common-2.17-55.el6.x86_64.rpm
wget http://copr-be.cloud.fedoraproject.org/results/mosquito/myrepo-el6/epel-6-x86_64/glibc-2.17-55.fc20/glibc-devel-2.17-55.el6.x86_64.rpm
wget http://copr-be.cloud.fedoraproject.org/results/mosquito/myrepo-el6/epel-6-x86_64/glibc-2.17-55.fc20/glibc-headers-2.17-55.el6.x86_64.rpm
sudo rpm -Uvh glibc-2.17-55.el6.x86_64.rpm \
@monakez
monakez / gdsf.sh
Created February 24, 2022 13:17
script just automate git diff-so-fancy
#!/bin/bash
# configuration script. just automate https://github.com/so-fancy/diff-so-fancy
set -e
mkdir -p $HOME/bin
pushd $HOME/bin
[ -e diff-so-fancy ] || wget https://raw.githubusercontent.com/so-fancy/diff-so-fancy/master/third_party/build_fatpack/diff-so-fancy
chmod 0755 diff-so-fancy
@monakez
monakez / gist:00e5388daa5a7b12fbd776e0da672248
Created October 4, 2021 11:58
SSH over aws Session Manager
#~/.ssh/config
# SSH over Session Manager
host i-* mi-*
ProxyCommand sh -c "aws ssm start-session --target %h --document-name AWS-StartSSHSession --parameters 'portNumber=%p'"
@monakez
monakez / private_fork.md
Created October 2, 2021 21:19 — forked from 0xjac/private_fork.md
Create a private fork of a public repository

The repository for the assignment is public and Github does not allow the creation of private forks for public repositories.

The correct way of creating a private frok by duplicating the repo is documented here.

For this assignment the commands are:

  1. Create a bare clone of the repository. (This is temporary and will be removed so just do it wherever.)

git clone --bare [email protected]:usi-systems/easytrace.git