Skip to content

Instantly share code, notes, and snippets.

@BrutalSimplicity
BrutalSimplicity / Dockerfile
Created September 1, 2022 20:20
Dockerfile with asdf + docker install bits
FROM debian:latest
# Install basic dev packages
RUN apt-get clean && apt-get update && apt-get -y install --no-install-recommends \
apt-utils \
openssh-client \
git \
gnupg2 \
dirmngr \
iproute2 \
@krisek
krisek / alert.rules.yml
Last active November 10, 2024 20:09
Prometheus alert rules for node exporter
groups:
- name: node_exporter_alerts
rules:
- alert: Node down
expr: up{job="monitoring-pi"} == 0
for: 2m
labels:
severity: warning
annotations:
title: Node {{ $labels.instance }} is down
@palpalani
palpalani / php-event-extensions.sh
Created July 12, 2020 03:39
Installing ev, event and libevent for PHP 7.4 on Ubuntu 20.04
cd /usr/src/
git clone https://github.com/expressif/pecl-event-libevent.git
cd pecl-event-libevent
phpize
./configure
make && sudo make install
sudo apt update
sudo apt install php7.4-dev libevent-dev
@x4x
x4x / .env
Last active July 7, 2023 15:52 — forked from plajjan/docker-compose.yml
NIPAP docker compose
NIPAP_USERNAME=www
NIPAPD_PASSWORD=nipapP4ssw0rd
WWW_USERNAME=admin
WWW_PASSWORD=123456
POSTGRES_PASSWORD=S3cretDBPas5
@tongphe
tongphe / nginx_log_header_lua.md
Last active February 9, 2024 03:06
Nginx logging header and body Lua

Build dynamic modules

yum install gcc git luajit-devel pcre-devel lua-devel zlib-devel
wget http://nginx.org/download/nginx-1.12.2.tar.gz
git clone https://github.com/openresty/lua-nginx-module.git
git clone https://github.com/simplresty/ngx_devel_kit.git
tar xzvf nginx-1.12.2.tar.gz
cd nginx-1.12.2
export LUAJIT_LIB=/usr/lib64 export LUAJIT_INC=/usr/include/luajit-2.0
./configure --with-compat --add-dynamic-module=/root/ngx_devel_kit --add-dynamic-module=/root/lua-nginx-module
openssl speed -multi 1 md5 sha1 sha256 sha512 des des-ede3 aes-128-cbc aes-192-cbc aes-256-cbc rsa2048 dsa2048 | tee /tmp/sslspeed
echo "|" `awk 'match($0,/r[0-9]+/) {print substr($0,RSTART,RLENGTH)}' /etc/banner` `awk -v FS=": " -v ORS="" '/(Processor|BogoMIPS|Hardware|machine|cpu model|system type)/ { print "| " $2 " " } END { print "" }' /proc/cpuinfo` `awk -v ORS="" '$1 ~ /OpenSSL/ {print "| " $2 " |"} $1 ~ /(md5|sha)/ {print "  " $5 " |"} $1 ~ /(des|aes)/ {b = b "  " $6 " |"} $1 ~ /(rsa|dsa)/ {print b "  " $6 " | " $7 " ";b=""} END { print "|" }' /tmp/sslspeed | sed 's/\.\(..\)k/\10/g'`

Device
OS
SoC
CPU
BogoMIPS
MD5 SHA1
SHA256
SHA512
DES
3DES
AES128
AES192
AES256
K1 Padavan MT7620 MIPS24K 385.02
@mrbar42
mrbar42 / README.md
Last active November 16, 2024 18:32
bash scripts to create VOD HLS stream with ffmpeg almighty (tested on Linux and OS X)

running:

bash create-vod-hls.sh beach.mkv

will produce:

    beach/
      |- playlist.m3u8
 |- 360p.m3u8
@efeldhusen
efeldhusen / vmware-template.centos7.sh
Last active May 23, 2023 04:02
Bash script for Centos 7.x VMware Template Images
#!/bin/bash
#Paths are for Centos 7.x
# Install optional packages
/usr/bin/yum install -y epel-release
/usr/bin/yum install -y bash-completion htop yum-utils dkms open-vm-tools
#stop logging services
/sbin/service rsyslog stop
/sbin/service auditd stop
{"lastUpload":"2020-04-30T04:17:22.471Z","extensionVersion":"v3.4.3"}
@Keshava11
Keshava11 / SFileUploader.py
Created February 22, 2017 09:02
Simple python script to upload file to Dropbox.
#!python3.5
# Prerequisites :
# 1.SetUp dropbox sdk to be able to use Dropbox Api's
# $ sudo pip install dropbox
# By default python dropbox sdk is based upon the python 3.5
#
# 2. Create an App on dropbox console (https://www.dropbox.com/developers/apps) which will be used and validated to do
# the file upload and restore using dropbox api. Mostly you need an access token to connect to Dropbox before actual file/folder operations.
#