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 / MultipleEmailAttachments.php
Created September 16, 2016 08:20 — forked from optikalefx/MultipleEmailAttachments.php
Multiple Email Attachments PHP from scratch
<?php
error_reporting(E_ALL);
ini_set('display_errors', 1);
if(isset($_FILES) && (bool) $_FILES) {
$allowedExtensions = array("pdf","doc","docx","gif","jpeg","jpg","png","rtf","txt");
$files = array();
@Fobiya
Fobiya / vk.html
Created September 20, 2016 12:54
vk api
<div id="vk_api_transport"></div>
<script type="text/javascript">
setTimeout(function() {
var el = document.createElement("script");
el.type = "text/javascript";
el.src = "//vk.com/js/api/openapi.js";
el.async = true;
document.getElementById("vk_api_transport").appendChild(el);
}, 0);
window.vkAsyncInit = function() {
@Fobiya
Fobiya / dabblet.css
Created November 8, 2016 12:55 — forked from voidove/dabblet.css
checkbox
/**
* checkbox
*/
input[type=checkbox] {
opacity: 0;
}
input[type=checkbox]+label {
position: relative;
margin-left: 20px;
}
@Fobiya
Fobiya / SCSS
Last active July 15, 2017 16:40
SCSS
header{
height: 1482px;
background: url(..) no-repeat top center;
@media only screen and (max-width: 1199px) and (min-width: 993px) {
background: url(..) no-repeat top center;
height: 1482px;
}
@media only screen and (max-width: 992px) and (min-width: 769px) {
background: url(..) no-repeat top center;
@Fobiya
Fobiya / sa
Last active November 25, 2019 14:21
JS ADD CODE
"use strict";
header__opacity -> in header
menu transutuion
$(window).scroll(function() {
var height = $(window).scrollTop();
console.log(height);
if(height < 150 ) {
$('header').removeClass('header__opacity');
} else {
@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);
@Fobiya
Fobiya / (functions.php)
Last active February 11, 2020 09:42
(functions.php)
<?php
/**
* WordPress (function.php)
* @package Fobiya
* @subpackage
* Template Name: Definitive__Guide
* Template Post Type: post, page, product
*/
Template Post Type: post, page, product, Landings, landings, landings,l - slag page-attributes
@Fobiya
Fobiya / _COOKIE
Last active December 21, 2018 10:51
_COOKIE
@Fobiya
Fobiya / acf plagin
Last active January 23, 2020 10:10
acf plagin
/----------------------------------------------------------- acf filter in function php ---------------------------------------------------------------------/
add_shortcode('brand', 'brand_config');
// END BRAND LINKS
//add_filter( 'tradersoft', 'do_shortcode');
add_filter( 'wpcf7_form_elements', 'do_shortcode');
add_filter('acf/format_value/type=wysiwyg', 'do_shortcode');
add_filter('acf/format_value/type=textarea', 'do_shortcode');
add_filter('acf/format_value/type=text', 'do_shortcode');
@Fobiya
Fobiya / json
Created January 25, 2019 08:43
json
<script src="http://code.jquery.com/jquery-1.7.1.min.js"></script>
<script>
$.getJSON('https://', function(data) {
var output="";
for (var i in data.user) {
output+="<p>"+ data.user[i].name+"</p>";