Skip to content

Instantly share code, notes, and snippets.

View vincurekf's full-sized avatar

Filip Vincůrek vincurekf

View GitHub Profile
@vincurekf
vincurekf / rethink-dns-lists.txt
Created April 29, 2025 05:17
ReThink DNS Lists
# Collection of ReThink DNS Lists - personalized selection
# Security
https://raw.githubusercontent.com/hoshsadiq/adblock-nocoin-list/master/hosts.txt
https://malware-filter.gitlab.io/malware-filter/urlhaus-filter-dnscrypt-blocked-names.txt
https://raw.githubusercontent.com/StevenBlack/hosts/master/data/add.Risk/hosts
https://gitlab.com/quidsup/notrack-annoyance-blocklist/-/raw/master/annoyance.list
https://raw.githubusercontent.com/Spam404/lists/master/main-blacklist.txt
https://raw.githubusercontent.com/olbat/ut1-blacklists/master/blacklists/malware/domains
https://raw.githubusercontent.com/olbat/ut1-blacklists/master/blacklists/phishing/domains
https://raw.githubusercontent.com/stamparm/blackbook/master/blackbook.txt
@vincurekf
vincurekf / hd-user-categories.php
Last active December 11, 2024 15:00 — forked from wpmark/hd-user-categories.php
A WordPress plugin that adds categories to users. It allows you to assign categories to users which you could then use elsewhere in your site.
<?php
/*
Plugin Name: User Categories
Plugin URI: https://highrise.digital/
Description: Adds categories to users. It allows you to assign categories to users which you could then use elsewhere in your site.
Version: 1.0
License: GPL-2.0+
Author: Highrise Digital Ltd
Author URI: https://highrise.digital/
Text domain: hd-user-categories
@vincurekf
vincurekf / averagehash.php
Last active April 2, 2024 10:33
Calculates average image hash, or compares two images if given two image paths. Ported code from example at https://01101001.net/averagehash.php
<?php
$hash1 = "";
$hash2 = "";
$similarity = 0;
if (isset($argv[1])) {
$hash1 = averageHash($argv[1]);
}
if (isset($argv[2])) {
@vincurekf
vincurekf / woocommerce_js_events.md
Last active March 17, 2021 19:35
Woocommerce Javascript events

Source https://wordpress.stackexchange.com/a/352171/91948

Woocommerce Checkout JS events

$( document.body ).trigger( 'init_checkout' );
$( document.body ).trigger( 'payment_method_selected' );
$( document.body ).trigger( 'update_checkout' );
$( document.body ).trigger( 'updated_checkout' );
$( document.body ).trigger( 'checkout_error' );
$( document.body ).trigger( 'applied_coupon_in_checkout' );
@vincurekf
vincurekf / wp_append_menu_items.php
Created February 18, 2021 09:03
Add a custom link to the end of a specific menu that uses the wp_nav_menu() function
<?php
/**
* Add a custom link to the end of a specific menu that uses the wp_nav_menu() function
*/
add_filter('wp_nav_menu_items', 'add_admin_link', 10, 2);
function add_admin_link($items, $args){
if( $args->theme_location == 'footer_menu' ){
$items .= '<li><a title="Admin" href="'. esc_url( admin_url() ) .'">' . __( 'Admin' ) . '</a></li>';
}
@vincurekf
vincurekf / hdgif.sh
Created February 26, 2018 11:10
This script takes videofile and converts it to high quality GIF, using ffmpeg.
#!/bin/bash
# Usage:
# hdgif -f='/path/to/video.mp4' -w=720 -q=2 -fps=22 -a=1
# -f = input video file
# -w = width of the final gif
# -q = quality, sets the bayer scale, lower number mean higher quality
# -fps = frames per second in the final gif
# -a = convert automatically, uses default options if not set and converts without asking
# -d = destination of where to save the final gif
@vincurekf
vincurekf / letsencrypt-vesta+fix.md
Last active May 30, 2017 21:12
VestaCP SSL Certificate automation Ubuntu 16.04

VestaCP + letsencrypt-vesta + certbot

Install VestaCP

bash vst-install.sh --nginx yes --apache yes --phpfpm no --named yes --remi yes --vsftpd yes --proftpd no --iptables yes --fail2ban yes --quota no --exim yes --dovecot yes --spamassassin yes --clamav yes --mysql yes --postgresql no --hostname DOMAIN.COM --email [email protected] --password NEW_VESTA_PASSWORD

installer

letsencrypt-vesta installation summary + fix

From letsencrypt-vesta

@vincurekf
vincurekf / ImagePicker.java
Created March 15, 2017 11:39 — forked from Mariovc/ ImagePicker.java
Utility for picking an image from Gallery/Camera with Android Intents
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.content.pm.ResolveInfo;
import android.content.res.AssetFileDescriptor;
import android.database.Cursor;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Matrix;
import android.media.ExifInterface;
@vincurekf
vincurekf / upload.php
Last active March 10, 2017 14:07
Upload test script
<?php
/**
* Velmi jednoduchý příklad zpracování fotek z aplikace
*/
$uploads_path = "uploads/";
//
$upload = $_POST["upload"];
$op = $_POST["op"];
$user_id = $_POST["user_id"];
$category_id = $_POST["category_id"];
@vincurekf
vincurekf / App_Http_VideoStream.php
Created January 21, 2017 13:16 — forked from vluzrmos/App_Http_VideoStream.php
Laravel VideoStream.
<?php
namespace App\Http;
/**
* Description of VideoStream
*
* @author Rana
* @link https://gist.github.com/vluzrmos/d5682ad426525196d069
*/