Skip to content

Instantly share code, notes, and snippets.

View NickMkrtchyan's full-sized avatar
🏠
Working from home

Nick Mkrtchyan NickMkrtchyan

🏠
Working from home
  • WeBuild Holding LLC
  • Russia / St. Petersburg
View GitHub Profile
@marstamyan
marstamyan / access_code_verification.php
Created February 12, 2024 15:22
This file checks user-entered access codes for validity, granting access if the code is correct, and prompting for re-entry if incorrect.
<?php
// Check if a valid access code has been submitted
if (isset($_POST['access_code'])) {
$stored_hash = 'a891af9b4934fe765b5778469d1f1f45'; // Replace with your actual MD5 hash
$entered_code = $_POST['access_code'];
$entered_hash = md5($entered_code); // Hash the entered code
if ($entered_hash === $stored_hash) {
// Display your link
@askwpgirl
askwpgirl / functions.php
Created February 15, 2021 20:00
Show Elementor Posts after today's date for events using ACF date field
<?php
//Info about custom query filters:
//https://developers.elementor.com/custom-query-filter/ combined with
// https://www.advancedcustomfields.com/resources/date-time-picker/
// The query ID goes in the Elementor Query under the Query area of the post list widget (see screenshot).
@hootlex
hootlex / laravellocal.md
Last active February 10, 2025 09:54
Run laravel project locally

##Windows users:

cmder will be refered as console

##Mac Os, Ubuntu and windows users continue here:

  • Create a database locally named homestead utf8_general_ci
@tjhole
tjhole / WORDPRESS: Base64 Image to Wordpress Uploads directory
Created May 9, 2014 12:35
WORDPRESS: Base64 Image to Wordpress Uploads directory
function tattoo_submit() {
if (isset($_POST["addtattoo"])) {
$title = "Tattoo : ". $_POST["tatooInput"];
$my_post = array(
'post_title' => $title,
'post_status' => 'publish',
'post_author' => 1,