Skip to content

Instantly share code, notes, and snippets.

Avatar
🐋

pida42 pida42

🐋
  • Magrathean Republic
  • Earth... Sometimes Magrathea...
View GitHub Profile
@pida42
pida42 / techniky-vyhledavani-pomoci-google.md
Created Apr 5, 2021
Techniky vyhledávání pomocí Google
View techniky-vyhledavani-pomoci-google.md

Vyhledávací nástroj Google naleznate na internetové stránce www.google.com. Nabídne vám různé možnosti vyhledávání. Prohledává web, obrázky, skupiny a adresář. Tyto možnosti poskytují spoustu výhod pro snadné surfování na internetu, ale dovolují i daleko více nečistých možností zcela zlomyslným internetovým uživatelům jako hackerům, počítačovým zločincům, zlodějům identit a dokonce i teroristům.
Tento dokument poukazuje na černé stránky vyhledávače Google s tím, že bychom pro něj společně mohli používat termín "Google hacking". Cílem tohoto dokumentu je vést webové administrátory a jiné lidi zabývající se bezpečností na síti v naději v lepší utěsnění děr, jimiž touto cestou

@pida42
pida42 / create-certs.sh
Created Mar 8, 2021
Script which helps you to create CA, server and client certificates.
View create-certs.sh
#!/usr/bin/env bash
function usage {
echo -n "
NAME
create-certs.sh - create CA, server and client certificates
SYNOPSIS
create-certs.sh [OPTION]...
View Command-output_conda-install-opencv.cmd
(base) root@magrathea:~# conda install -c conda-forge opencv
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: -
Found conflicts! Looking for incompatible packages.
This can take several minutes. Press CTRL-C to abort.
failed |
View subprocess-zombie.py
import os
import subprocess
import time
## If the parent process is ignoring that output,
## the Popen call cannot destroy the process as it has data sitting in a pipe and generates zombie processes.
#p = subprocess.Popen('ls -l /tmp', shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
#time.sleep(10)
View ImapSync
#! /bin/sh
# imapcopy -- Sync IMAP accounts (from server account A to server account B)
# Copyright (C) 2016 Frantisek Preissler, <github@ntisek.cz>
# Released under the terms of The MIT License
#if [ $# != 4 ]
if [ $# != 1 ]
then
# echo Usage: imapcopy [SOURCE-USER] [SOURCE-PASS] [TARGET-USER] [TARGET-PASS]
@pida42
pida42 / linux-cmd-cheatsheet.md
Created Jun 28, 2020
Admin's command line cheat sheet
View linux-cmd-cheatsheet.md

Admin's command line cheat sheet

Arguments, variables and parameters

Argumets

$#	                                    Number of arguments
$*	                                    All arguments
$@	                                    All arguments, starting from first
View cloud-test.yml
alfresco:
links:
- database
- solr
- activemq
- pdf-renderer
- imagemagick
- libreoffice
- tika
ports:
View template_zabbix_agent_net_tcp_service.xml
<?xml version="1.0" encoding="UTF-8"?>
<zabbix_export>
<version>3.4</version>
<date>2018-08-30T16:19:20Z</date>
<groups>
<group>
<name>Templates/Modules</name>
</group>
</groups>
<templates>
@pida42
pida42 / gitlab-update.sh
Last active Jun 27, 2017
Basic GitLab update script (from sources)
View gitlab-update.sh
#!/bin/bash
##
# Usage:
# $ cd /home/git/gitlab
# $ CURRENT_VERSION=8-9-stable TARGET_VERSION=8-10-stable SHELL_VERSION=v3.2.3 WORKHOUSE_VERSION=v0.7.8 sh update.sh
##
cd /home/git/gitlab/
@pida42
pida42 / jail.local
Created May 18, 2016
Fail2Ban - SMTP fiters that helps me resolve attacked mail server with Postfix and Dovecot
View jail.local
## content of: /etc/fail2ban/jail.local
[mail-smtp]
enabled = true
logpath = /var/log/mail.log
filter = mail-smtp
maxretry = 1
action = iptables-multiport[name=mail-smtp, port="25,587", protocol=tcp]