Skip to content

Instantly share code, notes, and snippets.

View stigfromsouth's full-sized avatar
👻

Alexander Belashev stigfromsouth

👻
  • LES LTD
  • Novocherkassk
View GitHub Profile
@pavloshargan
pavloshargan / MinioSSLDeployment.md
Last active June 25, 2025 04:27
Safely Host Your Own S3 Server at Home: Ditch the Crazy AWS Bills with MinIO on Windows and SSL

Host Your Own S3 Server at Home: Ditch the Crazy AWS Bills with MinIO on Windows and SSL

I'll show how to set up local S3 server at home that can be accessed via an HTTPS link, along with a guide on how to set it up! The following code is just an example of how it will look in result. Just like a regural AWS S3 endpoint. But hosted on your own machine. For free.

Contents

  1. The Genesis of This Article
  2. About AWS S3 Costs
@valferon
valferon / postgres_manager.py
Created March 29, 2018 02:35
Python script to take care of postgres backup and restore of data
#!/usr/bin/python3
import argparse
import logging
import subprocess
import os
import tempfile
from tempfile import mkstemp
import configparser
import gzip
@kubaceg
kubaceg / Dockerfile
Created May 4, 2017 07:30
Docker install ioncube extension (php 5.6)
RUN curl -o ioncube.tar.gz http://downloads3.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz \
&& tar -xvvzf ioncube.tar.gz \
&& mv ioncube/ioncube_loader_lin_5.6.so `php-config --extension-dir` \
&& rm -Rf ioncube.tar.gz ioncube \
&& docker-php-ext-enable ioncube_loader_lin_5.6
@jlinoff
jlinoff / mycrypt.py
Last active April 2, 2024 13:28
Simple python tool that demonstrates openssl -aes-256-cbc compatible encrypt/decrypt.
#!/usr/bin/env python
'''
Implement openssl compatible AES-256 CBC mode encryption/decryption.
*********************************
UPDATE: 2021-08-28
Apparently this no longer works out of the box. That is probavbly because the
pycrypto package is getting stale.
I found this hacky workaround to get things working but it is likely not safe:
@ipbastola
ipbastola / clean-up-boot-partition-ubuntu.md
Last active August 16, 2024 13:39
Safest way to clean up boot partition - Ubuntu 14.04LTS-x64, Ubuntu 16.04LTS-x64

Safest way to clean up boot partition - Ubuntu 14.04LTS-x64, Ubuntu 16.04LTS-x64

Reference

Case I: if /boot is not 100% full and apt is working

1. Check the current kernel version

$ uname -r 
@opexxx
opexxx / vhd2raw.cmd
Created April 30, 2015 12:45 — forked from mwchambers/gist:1319382
convert VHD file to RAW Image
qemu-img convert -O raw source.vhd output.raw
#EXTM3U
#EXTINF:-1,BBC - Radio 1
http://bbcmedia.ic.llnwd.net/stream/bbcmedia_radio1_mf_p
#EXTINF:-1,BBC - Radio 2
http://bbcmedia.ic.llnwd.net/stream/bbcmedia_radio2_mf_p
#EXTINF:-1,BBC - Radio 3
http://open.live.bbc.co.uk/mediaselector/5/select/version/2.0/mediaset/http-icy-aac-lc-a/format/pls/vpid/bbc_radio_three.pls
#EXTINF:-1,BBC - Radio 4
http://bbcmedia.ic.llnwd.net/stream/bbcmedia_radio4fm_mf_p
#EXTINF:-1,BBC - Radio 5 live
@sirbrillig
sirbrillig / pgsql_backup.sh
Last active June 4, 2025 12:56 — forked from dangerousbeans/pgsql_backup.sh
Postgresql daily backup script.
#!/bin/bash
#
# Backup a Postgresql database into a daily file.
#
BACKUP_DIR=/pg_backup
DAYS_TO_KEEP=14
FILE_SUFFIX=_pg_backup.sql
DATABASE=
USER=postgres
@rgreenjr
rgreenjr / postgres_queries_and_commands.sql
Last active June 24, 2025 08:45
Useful PostgreSQL Queries and Commands
-- show running queries (pre 9.2)
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query
FROM pg_stat_activity
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%'
ORDER BY query_start desc;
-- show running queries (9.2)
SELECT pid, age(clock_timestamp(), query_start), usename, query
FROM pg_stat_activity
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%'