Skip to content

Instantly share code, notes, and snippets.

= Some yum usage for people who know "apt" =
If you are familiar with the apt package manager on Debian/Ubuntu this page should help you transfer your knowledge to working with yum on Fedora/RHEL/CentOS/etc.
Note that this page as currently written is by non-apt experts, so there may be some mistakes.
== General points ==
* Speed:
* data/CPU: apt on Debian deals with roughly ~37,000 packages[1] and an extra 6,500 "provides"[2]. yum on Fedora deals with roughly 24,000 packages, 143,000 provides and 3,100,000 file provides.
@timlianov
timlianov / script.sh
Created April 25, 2022 10:23
telegram multiline message from Jenkins job
cat << EOF > str_pre
❌ ${JOB_NAME}
%0A
%0APR: ${ghprbPullLink}
%0AJOB: ${JOB_URL}
EOF
STR_PRE=$(cat str_pre)
STR=$(echo $STR_PRE | sed 's/\./\\./g; s/\*/\\*/g; s/\[/\\[/g; s/\-/\\-/g;')
@timlianov
timlianov / centos_7_setup_geth_node
Created February 4, 2021 17:43
simple bash script to build and run go-ethereum on Centos7
sudo yum update -y
sudo yum install -y epel-release
sudo yum -y install https://packages.endpoint.com/rhel/7/os/x86_64/endpoint-repo-1.7-1.x86_64.rpm
sudo yum install -y git
sudo yum -y install golang
sudo yum -y install gmp-devel
sudo yum groupinstall "Development tools" -y
git clone https://github.com/ethereum/go-ethereum
@timlianov
timlianov / start_docker_registry.bash
Created October 29, 2020 12:19 — forked from u1i/start_docker_registry.bash
Start docker registry with letsencrypt certificates and Basic Auth
#!/usr/bin/env bash
# install docker
# https://docs.docker.com/engine/installation/linux/ubuntulinux/
# install docker-compose
# https://docs.docker.com/compose/install/
# install letsencrypt
# https://www.digitalocean.com/community/tutorials/how-to-secure-nginx-with-let-s-encrypt-on-ubuntu-16-04
@timlianov
timlianov / gist:0eb19c508bd5e496f8c547bfd8a3fd8b
Created May 4, 2017 10:13 — forked from wsk3201/gist:8555039
Add bootstrap style to Backgrid.Paginator
var Paginator = Backgrid.Extension.Paginator = Backgrid.Extension.Paginator.extend({
render: function(){
Paginator.__super__.render.apply(this,arguments);
this.$el.find('ul').addClass('pagination');
return this;
}
});
@timlianov
timlianov / parent_path.sh
Created May 3, 2017 10:34
Relative paths based on file location instead of current working directory
#!/bin/bash
parent_path=$( cd "$(dirname "${BASH_SOURCE[0]}")" ; pwd -P )
cd "$parent_path"
cat ../some.text
# Shorthand Git CLI syntax + better git log
# Better git log
git config --global alias.lg "log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative"
function gs {
git status
}
function gd {
mkdir -p ~/.vim/autoload ~/.vim/bundle && \
curl -LSso ~/.vim/autoload/pathogen.vim https://tpo.pe/pathogen.vim && \
echo "execute pathogen#infect()" > ~/.vimrc && \
echo "syntax on" >> ~/.vimrc && \
filetype plugin indent on >> ~/.vimrc &&\
git clone https://github.com/scrooloose/nerdtree.git ~/.vim/bundle/nerdtree \
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title></title>
</head>
<body>
<div>
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=320, initial-scale=1"/>
<title>jsmpeg streaming</title>
<style type="text/css">
body {
background: #333;
text-align: center;
margin-top: 10%;