Skip to content

Instantly share code, notes, and snippets.

View tevashov's full-sized avatar

Teff tevashov

View GitHub Profile
@tevashov
tevashov / inline-img-src-data.html
Last active December 11, 2022 07:12
Inline SVG in HTML/CSS #HTML #CSS
<!--
UTF8 <img class="logo" alt="logo" src="data:image/svg+xml;uft8,[data]">
BASE64 <img class="logo" alt="logo" src="data:image/svg+xml;base64,[data]">
use https://yoksel.github.io/url-encoder/ to encode SVG content
-->
<img class="logo" alt="logo" src="data:image/svg+xml;uft8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='25' height='18'%3E%3Cg fill='%23242D52' fill-rule='evenodd'%3E%3Cpath d='M0 0h25v4H0zM0 7h25v4H0zM0 14h25v4H0z'/%3E%3C/g%3E%3C/svg%3E">
@tevashov
tevashov / markup.html
Last active November 16, 2022 10:27
SVG image packed #html
<ul class="social-list" role="list" aria-label="social links">
<li><a aria-label="facebook" href="#">
<svg class="social-icon">
<use xlink:href="images/social-icons.svg#icon-facebook"></use>
</svg>
</a></li>
<li><a aria-label="youtube" href="#">
<svg class="social-icon">
<use xlink:href="images/social-icons.svg#icon-youtube"></use>
</svg>
@tevashov
tevashov / Sanitize-Full.html
Last active November 8, 2022 07:32
Reset CSS - Sanitize CSS #CSS
<!-- Sanitize CSS: https://github.com/csstools/sanitize.css#features -->
<link href="https://cdn.skypack.dev/sanitize.css" rel="stylesheet" />
@tevashov
tevashov / modernCSSreset.html
Last active November 8, 2022 07:31
Reset CSS - Modern CSS Reset #CSS
<!-- Modern CSS Reset: https://piccalil.li/blog/a-modern-css-reset/ (GitHub https://github.com/hankchizljaw/modern-css-reset) -->
<link rel="stylesheet" href="https://unpkg.com/modern-css-reset/dist/reset.min.css" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/modern-css-reset/dist/reset.min.css" />
@tevashov
tevashov / reset-basic.css
Last active November 8, 2022 07:26
Reset CSS - basic #CSS
html,
body,
div,
span,
applet,
object,
iframe,
h1,
h2,
h3,
@tevashov
tevashov / release.yaml
Last active November 8, 2022 07:25 — forked from mircohacker/release.yaml
Push to Github Pages with Github Actions #GitHub
name: Build and Deploy
on:
push:
branches:
- master
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
@tevashov
tevashov / NPM gh-pages script.md
Last active November 8, 2022 07:24 — forked from cobyism/gh-pages-deploy.md
Deploy to `gh-pages` from a `dist` folder on the master branch. Useful for use with [yeoman](http://yeoman.io). #GitHub

Using https://www.npmjs.com/package/gh-pages was the way to go for me. Saves tons of headaches especially if you're working with others.

If you already have a "gh-pages" branch, use the 1st command below. If you don't have a "gh-pages" branch, initialize it by using the 2nd command below. Make it easier to run by creating scripts like these in your package.json file:

"scripts": {
      "gh-deploy": "git push origin :gh-pages && git subtree push --prefix dist origin gh-pages"
      "gh-deploy-init": "git push origin && git subtree push --prefix dist origin gh-pages",
}
@tevashov
tevashov / .htaccess
Created June 3, 2015 13:45
Host-sensitive access restrictions
# ----------------------------------------------------------------------
# :: Host-sensitive access
# http://tomschlick.com/2009/11/08/conditional-htpasswd-multi-environments/
# ----------------------------------------------------------------------
# : LIVE host, ALLOW access [ EDIT HERE ]
SetEnvIf HOST "^www.inbio-ventures.com" live_url
# : LOCAL host, ALLOW access
@tevashov
tevashov / scripts.php
Last active October 27, 2022 21:55
Clean output buffer from NextGen Gallery crap (Roots starter theme) #WP
/**
* Подчищаем ненужные скрипты и стили
*/
function teff_de_script() {
wp_dequeue_script('photocrati_ajax');
wp_deregister_script('photocrati_ajax');
wp_dequeue_script('ngg-store-js');
wp_deregister_script('ngg-store-js');
@tevashov
tevashov / Asset.php
Last active October 27, 2022 21:51
Remove menu items from WordPress admin panel/dashboard #WP
function remove_links_menu() {
     remove_menu_page('index.php'); // Dashboard
     remove_menu_page('edit.php'); // Posts
     remove_menu_page('upload.php'); // Media
     remove_menu_page('link-manager.php'); // Links
     remove_menu_page('edit.php?post_type=page'); // Pages
     remove_menu_page('edit-comments.php'); // Comments
     remove_menu_page('themes.php'); // Appearance
     remove_menu_page('plugins.php'); // Plugins
     remove_menu_page('users.php'); // Users