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} — путь к месту нахождения картинки.
function remove_scripts() {
wp_dequeue_script( 'script-name' );
}
function remove_styles() {
wp_dequeue_style( 'style-name' );
}
add_action( 'wp_print_scripts', 'remove_scripts' );
add_action( 'wp_print_styles', 'remove_styles' );
@Fobiya
Fobiya / contact_me.php
Created October 30, 2018 14:43 — forked from sharkyak/contact_me.php
Contact form file send
<?php
if($_POST)
{
$to_email = "a.kazakov@computer-ufa.ru"; //Recipient email, Replace with own email here
$from_email = "noreply@YOUR-DOMAIN.com"; //From email address (eg: no-reply@YOUR-DOMAIN.com)
$subject = "subject";
//Sanitize input data using PHP filter_var().
$phone1 = filter_var($_POST["phone1"], FILTER_SANITIZE_STRING);
$phone2 = filter_var($_POST["phone2"], FILTER_SANITIZE_STRING);