Skip to content

Instantly share code, notes, and snippets.

View Fobiya's full-sized avatar
:octocat:
I may be slow to respond.

Fobiya

:octocat:
I may be slow to respond.
  • Kiev Ukraine
View GitHub Profile
@Fobiya
Fobiya / iso-language-codes.txt
Created January 11, 2024 10:04 — forked from eddieoz/iso-language-codes.txt
ISO Locale Language Code table
Code Name
af Afrikaans
af-ZA Afrikaans (South Africa)
ar Arabic
ar-AE Arabic (U.A.E.)
ar-BH Arabic (Bahrain)
ar-DZ Arabic (Algeria)
ar-EG Arabic (Egypt)
ar-IQ Arabic (Iraq)
ar-JO Arabic (Jordan)
@Fobiya
Fobiya / change-class-on-scroll.html
Created March 2, 2023 23:31 — forked from ohiosveryown/change-class-on-scroll.html
Vanilla JS – change/add class based on scroll position.
// https://codepen.io/cmykw/pen/gemxJm
// layout
<nav/>
// style
<style>
body { min-height: 200vh; }
nav {
@Fobiya
Fobiya / wp_query-args.md
Created November 29, 2022 05:58 — forked from EkoJR/wp_query-args.md
WP Query $args - Reference for params / args in . Ex. WP_Query( $args )
@Fobiya
Fobiya / WP_Query.php
Created November 21, 2022 06:27 — forked from Dimasmagadan/WP_Query.php
#WordPress query with args
<?php
/**
* WordPress Query Comprehensive Reference
* Compiled by luetkemj - luetkemj.com
*
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query#Parameters
* Source: https://core.trac.wordpress.org/browser/tags/3.9/src/wp-includes/query.php
*/
$args = array(
//////Author Parameters - Show posts associated with certain author.
@Fobiya
Fobiya / walker.php
Created September 2, 2022 08:11 — forked from chodorowicz/walker.php
remove li from wp_nav_menu, preserve classes, custom walker
<?php
// based on, fixed warnings http://www.designtoday.info/removing-li-menu-from-wordpress/
class Description_Walker extends Walker_Nav_Menu {
function start_el(&$output, $item, $depth = 0, $args = array(), $id = 0) {
$classes = empty($item->classes) ? array () : (array) $item->classes;
$class_names = join(' ', apply_filters( 'nav_menu_css_class', array_filter( $classes ), $item ) );
!empty ( $class_names ) and $class_names = ' class="'. esc_attr( $class_names ) . '"';
$output .= "";
$attributes = '';
@Fobiya
Fobiya / application.coffee
Created July 20, 2022 16:18 — forked from mhulet/application.coffee
Webpack with CoffeeScript loader
# app/javascript/packs/application.coffee
import 'selectize/dist/css/selectize.default'
import 'ladda/dist/ladda-themeless.min'
import 'jquery'
import 'foundation-sites'
import * as Ladda from 'ladda'
import '../src/js/init'
import '../src/js/app.draggable_images'
![Иллюстрация к проекту](https://github.com/jon/coolproject/raw/master/image/image.png)
![Image alt](https://github.com/{username}/{repository}/raw/{branch}/{path}/image.png)
{username} — ваш ник на ГитХабе;
{repository} — репозиторий где хранятся картинки;
{branch} — ветка репозитория;
{path} — путь к месту нахождения картинки.
@Fobiya
Fobiya / Js Native nab
Created July 31, 2020 21:39
Js Native nab
for(let link of document.querySelectorAll('.block-black')){
link.onclick = (e) =>{
if(e.target === link.querySelector('.title')){
link.classList.toggle('active');
// link.parentElement.classList.toggle('active');
}
}
}
@Fobiya
Fobiya / checkbox
Last active June 25, 2020 01:38
checkbox
$('.check').click(function(){
this.value = (this.value)?'':this.dataset.check;
});
$( document ).ready(function() {
$('input[type="checkbox"]').click(function() {
if ($(this).val() === '') {
$(this).val($(this).data("check"));
} else {
@Fobiya
Fobiya / rest_api_init add input
Created June 19, 2020 16:18
rest_api_init add input
rest_api_init add input
/wp-json/wp/v2/blog/33393?&_embed
/**** getPostViews ****/