Skip to content

Instantly share code, notes, and snippets.

View pida42's full-sized avatar
🐋

pida42 pida42

🐋
  • Magrathean Republic
  • Earth... Sometimes Magrathea...
View GitHub Profile
@pida42
pida42 / youtube-auto-adds-skip.js
Last active October 15, 2023 15:33
Tampermonkey: YouTube Script auto Adds skip
// ==UserScript==
// @id youtube-auto-adds-skip@pida42
// @name YouTube Script auto Adds skip
// @description Automatically trigger click event on "Skip add" button.
// @namespace https://gist.github.com/pida42/43a304ba7b944a5c0abf8169cfe4096f
// @version 1.0.1
// @author pida42
// @include https://www.youtube.com/*
// @match https://www.youtube.com/*
// @require https://code.jquery.com/jquery-2.1.4.min.js
@pida42
pida42 / .bashrc
Created September 2, 2021 13:25
Bash (.bashrc, .profile, ...) custom functions
# [...]
# Docker functions
function docker-exec() {
Container=$1
echo "Running command: docker exec -ti $Container /bin/bash"
docker exec -ti $Container /bin/bash
}
function docker-exec-sh() {
@pida42
pida42 / .bash_aliases
Created September 2, 2021 13:18
Most common Bash Aliases
# Docker, Docker Compose
alias docker-clear='docker rm -f $(docker ps -q -a); docker rmi -f $(docker images -q); docker system prune --all --force --volumes'
alias docker-down='docker-compose down'
alias docker-images='docker images --all'
alias docker-logs='docker-compose logs --tail=1000 -f -t'
alias docker-ps='docker ps -a'
alias docker-up='DATE_FROM=`date`; echo "BUILD START: $DATE_FROM" ; docker-compose up -d --build; DATE_TO=`date`; echo -e "BUILD START: $DATE_FROM\nBUILD END: $DATE_TO\n"'
alias docker-up-nohup='DATE_FROM=`date`; echo "BUILD START: $DATE_FROM" ; nohup docker-compose up -d --build $ && DATE_TO=`date`; echo -e "BUILD START: $DATE_FROM\nBUILD END: $DATE_TO\n"'
# Kubernetes
@pida42
pida42 / techniky-vyhledavani-pomoci-google.md
Last active October 22, 2021 12:34
Techniky vyhledávání pomocí Google

Techniky vyhledávání pomocí Google

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

@pida42
pida42 / create-certs.sh
Created March 8, 2021 04:27
Script which helps you to create CA, server and client certificates.
#!/usr/bin/env bash
function usage {
echo -n "
NAME
create-certs.sh - create CA, server and client certificates
SYNOPSIS
create-certs.sh [OPTION]...
(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 |
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)
@pida42
pida42 / ImapSync
Created September 12, 2020 07:19
#! /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
Last active October 31, 2021 02:41
Admin's command line cheat sheet

Admin's command line cheat sheet

Arguments, variables and parameters

Argumets

$#	                                    Number of arguments
$*	                                    All arguments
$@	                                    All arguments, starting from first
alfresco:
links:
- database
- solr
- activemq
- pdf-renderer
- imagemagick
- libreoffice
- tika
ports: