Skip to content

Instantly share code, notes, and snippets.

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

Denys Dovzhenko DenisDov

🏠
Working from home
View GitHub Profile
function heightDetect() {
$(".main_head").css("height", $(window).height());
};
heightDetect();
$(window).resize(function() {
heightDetect();
});
platform :ios, '9.1'
abstract_target 'Foo' do
# RN related
pod 'React', :path => '../node_modules/react-native', :subspecs => [
'Core',
'CxxBridge',
'RCTAnimation',
'RCTBlob',
'RCTText',
<?php
if ( have_posts() ) : // если имеются записи в блоге.
query_posts('cat=3'); // указываем ID рубрик, которые необходимо вывести.
while (have_posts()) : the_post(); // запускаем цикл обхода материалов блога
?>
<?php the_post_thumbnail(array(100, 100)); ?>
<? endwhile; // завершаем цикл.
endif;
/* Сбрасываем настройки цикла. Если ниже по коду будет идти еще один цикл, чтобы не было сбоя. */
wp_reset_query();
<?php echo get_post_meta($post->ID, 'year', true); ?>
<?php
$post = $wp_query->post;
if (in_category('cat_label_1')) {
include(TEMPLATEPATH.'/single-cat_label_1.php');
} elseif (in_category('cat_label_2')) {
include(TEMPLATEPATH.'/single-cat_label_2.php');
}
?>
@jremi
jremi / emoji-loop.js
Last active November 22, 2021 01:19
For loop to display emoji icon
var imgSource = 'http://fonts.voxmedia.com/emoji/unicode/1f4a9.png';
var txtSource = "shit ♥ ";
var valueInput = prompt("How many shit faces?");
for (var a = 1; a <= valueInput; a++) {
$("#container").add("div").attr('id', "image" + a);
$("#image" + a).append("<img class = 'emojiIcon' src=" + imgSource + ">");
$("#container").add("div").attr('id', "text" + a);
$("#text" + a).append("<h3 class = 'emojiNumber'>" + txtSource + a + "</h3>");
}
@agragregra
agragregra / gist:7ae9c76e895b3bacd944
Last active December 4, 2022 16:43
Sublime Text My Settings
// Keymap (Windows Users):
[
{ "keys": ["alt+shift+f"], "command": "reindent" },
]
// Settings:
{
"auto_complete": false,
"bold_folder_labels": true,
"close_windows_when_empty": false,
@adhithyan15
adhithyan15 / countdown.js
Last active April 7, 2023 19:35
A simple countdown timer in Javascript
/********************************************************************************************************************
Countdown.js is a simple script to add a countdown timer
for your website. Currently it can only do full minutes
and partial minutes aren't supported. This script is a fork of http://jsfiddle.net/HRrYG/ with some
added extensions. Since the original code that I forked was released under Creative Commons by SA license,
I have to release this code under the same license. You can view a live demo of this code at http://jsfiddle.net/JmrQE/2/.
********************************************************************************************************************/
function countdown(minutes) {
var seconds = 60;
var mins = minutes
@agragregra
agragregra / mfp-blurred.css
Last active July 4, 2023 22:22
Magnific-Popup Blurred Background
CSS:
* {
transition: filter .25s ease;
}
.mfp-wrap ~ * {
filter: blur(1px);
}
Sass:
*
import useFetch from "useFetch";
const { response, isLoading } = useFetch({
api: identityApi,
url: AUTH_MEMBER_TRANSACTIONS(requestOptions),
config: JSON.stringify({ requireAuthentication: true }),
});