Skip to content

Instantly share code, notes, and snippets.

View sioniks's full-sized avatar
👻
...

Oleksandr sioniks

👻
...
View GitHub Profile
@sioniks
sioniks / example-input.html
Created September 17, 2020 22:59 — forked from stowball/example-input.html
Fetch a remote SVG as an <img> and convert it to an inline SVG
<img
alt="accessible text"
class="fill-color-red"
height="16"
src="some.svg"
width="16"
onload="fetchSvgInline(this)"
/>
@sioniks
sioniks / gulpfile.js
Created July 22, 2019 06:55 — forked from nandunbandara/gulpfile.js
FTP Upload to remote server
'use strict';
var gulp = require('gulp');
var gutil = require('gulp-util');
var ftp = require('vinyl-ftp');
var user = process.env.FTP_USER;
var pwd = process.env.FTP_PWD;
var localFiles = [
@sioniks
sioniks / .gitconfig
Last active November 21, 2018 19:38 — forked from pksunkara/config
Sample of git config file (Example .gitconfig)
[user]
name = Pavan Kumar Sunkara
email = pavan.sss1991@gmail.com
username = pksunkara
[core]
editor = vim
whitespace = fix,-indent-with-non-tab,trailing-space,cr-at-eol
excludesfile = ~/.gitignore
[sendemail]
smtpencryption = tls
@sioniks
sioniks / .htaccess
Created November 24, 2017 09:12 — forked from ScottPhillips/.htaccess
Common .htaccess Redirects
#301 Redirects for .htaccess
#Redirect a single page:
Redirect 301 /pagename.php http://www.domain.com/pagename.html
#Redirect an entire site:
Redirect 301 / http://www.domain.com/
#Redirect an entire site to a sub folder
Redirect 301 / http://www.domain.com/subfolder/
@sioniks
sioniks / Javascript: scrollto().js
Created July 10, 2017 14:14 — forked from kovaldn/Javascript: scrollto().js
Javascript: scrollto()
(function () {
jQuery('#top_menu li a').on('click', function(){
var item = $(this).parent().attr('class'),
tar = $(this).attr('data');
$("html, body").animate({ scrollTop: jQuery(tar).offset().top }, 1000);
});
})()
/*
* запрещаем вводить цифры
* http://learn.javascript.ru/keyboard-events
*/
// keydown event
e = (e) ? e : window.event;
var charCode = (e.which) ? e.which : e.keyCode;
// если от 0 до 9
@sioniks
sioniks / CSS: media queries.css
Created July 10, 2017 14:13 — forked from kovaldn/CSS: media queries.css
CSS: media queries.css
/* Smartphones (portrait and landscape) ----------- */
@media only screen
and (min-device-width : 320px)
and (max-device-width : 480px) {
/* Styles */
}
/* Smartphones (landscape) ----------- */
@media only screen
and (min-width : 321px) {
<?php if ( have_posts() ) : query_posts('p=1');
while (have_posts()) : the_post(); ?>
<?php the_title(); ?>
<?php the_content(); ?>
<?php the_post_thumbnail(array(100, 100)); ?>
<? endwhile; endif; wp_reset_query(); ?>
.loader {
background: none repeat scroll 0 0 #ffffff;
bottom: 0;
height: 100%;
left: 0;
position: fixed;
right: 0;
top: 0;
width: 100%;
z-index: 9999;