Skip to content

Instantly share code, notes, and snippets.

View linuxoid69's full-sized avatar
🏠
Working from home

Rustam linuxoid69

🏠
Working from home
View GitHub Profile
@linuxoid69
linuxoid69 / HttpProxy.go
Created January 18, 2023 18:38 — forked from yowu/HttpProxy.go
A simple HTTP proxy by Golang
package main
import (
"flag"
"io"
"log"
"net"
"net/http"
"strings"
)
@linuxoid69
linuxoid69 / sample.spec
Created September 20, 2017 19:44 — forked from schnell18/sample.spec
Template RPM spec file
Summary: The world famous foo
Name: foo
Version: 1.03
Release: 1
License: GPL
Group: Applications/System
Source0: foo-%{version}.tar.bz2
Source1: foo.sysvinit
Patch0: foo-fix1.patch
Patch1: foo-fix2.patch BuildRoot: /var/tmp/%{name}-root
@linuxoid69
linuxoid69 / 0_rpm.md
Created September 20, 2017 19:42 — forked from Driste/0_rpm.md
RPM

RPM: Red-Hat Package Manager

The basic procedure to build an RPM is as follows:

  • Get the source code you are building the RPM for to build on your system.
  • Make a patch of any changes you had to make to the sources to get them to build properly.
  • Make a spec file for the package.
  • Make sure everything is in its proper place.
  • Build the package using RPM.

The Spec file

@linuxoid69
linuxoid69 / activemq.service
Created January 20, 2017 10:55
ActiveMQ service file for systemd
# cat activemq.service
[Unit]
Description=Apache ActiveMQ
After=network-online.target
[Service]
Type=forking
WorkingDirectory=/opt/activemq/bin
ExecStart=/opt/activemq/bin/activemq start
ExecStop=/opt/activemq/bin/activemq stop
@linuxoid69
linuxoid69 / autopgsqlbackup
Created April 22, 2016 13:19 — forked from matthewlehner/autopgsqlbackup
Auto PostgreSQL backup script.
#!/bin/bash
#
# PostgreSQL Backup Script Ver 1.0
# http://autopgsqlbackup.frozenpc.net
# Copyright (c) 2005 Aaron Axelsen <axelseaa@amadmax.com>
#
# This script is based of the AutoMySQLBackup Script Ver 2.2
# It can be found at http://sourceforge.net/projects/automysqlbackup/
#
# The PostgreSQL changes are based on a patch agaisnt AutoMySQLBackup 1.9