Skip to content

Instantly share code, notes, and snippets.

View net22sky's full-sized avatar
💭
I may be slow to respond.

Skorobogatov Evgenij net22sky

💭
I may be slow to respond.
View GitHub Profile
@net22sky
net22sky / pug.md
Created December 22, 2018 20:58 — forked from neretin-trike/pug.md
Туториал по HTML препроцессору Pug (Jade)
/*
* Apple - apple.com
* SF Pro Display used on apple.com as of iPhone 7 (RED) launch (March 21st 2017)
usage:
- font-family: "SF Pro Display","SF Pro Icons","Helvetica Neue","Helvetica","Arial",sans-serif;
- known issues:
- Access to Font at 'http://www.apple.com/wss/fonts/SF-Pro-Display/v1/sf-pro-display_bold.woff' from origin 'null' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access. The response had HTTP status code 404.
index.html:1 Access to Font at 'http://www.apple.com/wss/fonts/SF-Pro-Display/v1/sf-pro-display_bold.ttf' from origin 'null' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access. The response had HTTP status code 404.
@net22sky
net22sky / index.html
Created March 1, 2019 07:24 — forked from machwatt/index.html
animate.css and waypoints.js
<html>
<head>
<link href="path/to/your/css/animate.css" rel="stylesheet" type="text/css">
<style>
.hidden {
opacity: 0;
}
.visible {
opacity: 1;
}
if(window.location.hash){
$(document).ready(function() {
$(window).scroll(function() {
window.location.hash='#scroll'
})
})
window.hashName = window.location.hash;
if(window.hashName!="#sps"){
@net22sky
net22sky / add_rand_orderby_restapi_post.php
Created February 6, 2021 20:36 — forked from felipeelia/add_rand_orderby_restapi_post.php
Randomize the content list in REST API passing `orderby=rand` as parameter.
<?php
/**
* Plugin Name: REST API - Post list randomize
* Description: Randomize the content list in REST API passing `orderby=rand` as parameter.
* Version: 1.0.0
* Author: Felipe Elia | Codeable
* Author URI: https://codeable.io/developers/felipe-elia?ref=qGTOJ
*/
/**
@net22sky
net22sky / functions.php
Created February 7, 2021 09:03 — forked from EddyRespondek/functions.php
Wordpress - Simple AJAX Pagination
function get_posts_for_pagination() {
$html = '';
$paged = ( $_GET['page'] ) ? $_GET['page'] : 1;
$post_type = $_GET['posttype'];
if ( empty($post_type) ) {
return '';
}
if( filter_var( intval( $paged ), FILTER_VALIDATE_INT ) ) {
@net22sky
net22sky / template.php
Created March 24, 2021 09:27 — forked from laradevitt/template.php
(Drupal 7) Programmatically add <meta name="robots" content="noindex, nofollow"> to certain pages.
<?php
// I was getting a lot of "Indexed, though blocked by robots.txt" coverage
// errors on search/ pages from Google. Since robots.txt only prevents
// crawling, not indexing, I will allow crawling and prohibit indexing via
// the "robots" meta tag instead.
function MYTHEME_preprocess_html(&$variables) {
MYTHEME_add_meta_robots_noindex();
}
@net22sky
net22sky / Drupal8HorizontalTabs.php
Created July 10, 2021 08:49 — forked from normanlolx/Drupal8HorizontalTabs.php
How to create horizontal tabs programmatically in Drupal 8, requires Field Group module
<?php
// How to create horizontal tabs programmatically in Drupal 8, requires Field Group module
$form = array();
$form['my_field'] = array(
'#type' => 'horizontal_tabs',
'#tree' => TRUE,
'#prefix' => '<div id="unique-wrapper">',
'#suffix' => '</div>',
);
$items = array(
@net22sky
net22sky / Readme.md
Created October 28, 2021 09:52 — forked from Dmitriy-8-Kireev/Readme.md
Docker Шпаргалка
@net22sky
net22sky / metrials-go.md
Created November 6, 2021 11:23 — forked from egorsmkv/metrials-go.md
Материалы по Go (golang): мануалы, статьи, книги и ссылки на сообщества

Материалы по Go (golang)

На русском языке

Мануалы и туториалы

  • [Введение в программирование на Go][1]
  • [Маленькая книга о Go][3]
  • [Эффективный Go][2]
  • Есть еще [Краткий пересказ Effective Go на русском языке][4], но 2009 года