Skip to content

Instantly share code, notes, and snippets.

View LockdownUA's full-sized avatar

Olexandr Magalevytch LockdownUA

View GitHub Profile
@mkasberg
mkasberg / CustomLogger.php
Last active April 1, 2018 12:19
PHPUnit Hides Errors After set_error_handler() Called
<?php
class CustomLogger {
public function __construct() {
// Try commenting out this line:
set_error_handler(array($this, 'handleError'));
}
public function __desctruct() {
restore_error_handler();
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
<h2> Guess the secret word!</h2>
<input id="secret">
<button id="guess">guess</button>
<button id="reset">reset</button>
<p id="response"></p>
</head>
@agragregra
agragregra / button.sass
Last active July 28, 2025 22:38
Button Sass Styles (Universal Starter)
.button
display: inline-block
border: none
color: #fff
text-decoration: none
background-color: $accent
padding: 15px 45px
font-size: 13px
text-transform: uppercase
font-weight: 600
HTML:
<div class="wrapper">
<div class="tabs">
<span class="tab">Вкладка 1</span>
<span class="tab">Вкладка 2</span>
<span class="tab">Вкладка 3</span>
</div>
<div class="tab_content">
<div class="tab_item">Содержимое 1</div>
<div class="tab_item">Содержимое 2</div>
<?php if ( have_posts() ) : query_posts('p=1');
while (have_posts()) : the_post(); ?>
<?php the_title(); ?>
<?php the_content(); ?>
<?php the_post_thumbnail(array(100, 100)); ?>
<?php endwhile; endif; wp_reset_query(); ?>
function heightDetect() {
$(".main_head").css("height", $(window).height());
};
heightDetect();
$(window).resize(function() {
heightDetect();
});
#loader {
background: none repeat scroll 0 0 #ffffff;
bottom: 0;
height: 100%;
left: 0;
position: fixed;
right: 0;
top: 0;
width: 100%;
z-index: 9999;
@fcingolani
fcingolani / wp-backup.sh
Created October 5, 2012 13:41
Wordpress Backup bash script
#!/bin/bash
NOW=$(date +"%Y-%m-%d-%H%M")
DB_USER=""
DB_PASS=""
DB_NAME=""
DB_HOST=""
TREE_FILE="$NOW.tar.gz"