Skip to content

Instantly share code, notes, and snippets.

View zorca's full-sized avatar
✴️
Working from a faraway star

Zorca Orcinus zorca

✴️
Working from a faraway star
  • Lithuania
View GitHub Profile
@zorca
zorca / start.html
Last active August 29, 2015 14:13
Стартовый шаблон HTML
<!doctype html>
<html>
<head>
</head>
<body>
</body>
</html>
@zorca
zorca / woocommerce-sage-template-part-overrides.md
Created November 24, 2017 07:05 — forked from drawcard/woocommerce-sage-template-part-overrides.md
Woocommerce - Using template part overrides in Sage

So, you know how to override a template file in Woocommerce using Sage, but you're having trouble changing something within the deeper level of that template file. For example, you want to change the output HTML structure of a given part of the product page loop, or incorporate a Bootstrap class into a button element without using Jquery to inject it. Here's how you can override deeper level parts, the default WC theme elements.

Prerequisites

Now you're familiar with how to do Sage + Woocommerce templates, it's time to make it happen.

The template page override

86937 isset
43159 echo
31697 empty
29252 substr
26146 count
24248 is_array
22572 strlen
19365 sprintf
18090 unset
16584 str_replace
@zorca
zorca / bootstrap-4-sass-mixins-cheat-sheet.scss
Created August 17, 2018 16:18
Bootstrap 4 Sass Mixins [Cheat sheet with examples] #BS4
/* -------------------------------------------------------------------------- */
// All Bootstrap 4 Sass Mixins [Cheat sheet]
// @author http://anschaef.de
// @see https://github.com/twbs/bootstrap/tree/v4-dev/scss/mixins
/* -------------------------------------------------------------------------- */
// Grid variables
$grid-columns: 12 !default;
$grid-gutter-width: 30px !default;
@zorca
zorca / Gitlabserver.md
Created August 26, 2018 06:09 — forked from HendrikPetertje/Gitlabserver.md
Create your own GitLab server

#Setup Your own Gitlab server from the on-click install image ##Create the server image Login to Digital Ocean and create click the "New Droplet" button. In the page fill out the details for your new droplet. The best thing is to choose $10.- server since this server has the necessary RAM of 1GB. You can however choose for the $5.- server to but this will require setting up Swap once your server is deployed. Now when selecting your image choose "Application" and select GitLab. Create the droplet and wait for your ssh keys to come in.

##Modify the Ubuntu environment. ###Change login details Log in to your root account using your version of the command below

@zorca
zorca / simplepie_example.php
Created October 25, 2018 09:15 — forked from franz-josef-kaiser/simplepie_example.php
SimplePie - example method to list what information we can retrieve about a feed as a whole and for single items when looping through
<?php
defined( 'ABSPATH' ) OR exit;
/**
* Plugin Name: (WCM) RSS Importer
*/
add_action( 'plugins_loaded', array( 'WCMRSSImporterBootstrap', 'init' ) );
class WCMRSSImporterBootstrap
{
protected static $instance = null;
@zorca
zorca / youtube_id_regex.php
Created December 8, 2018 13:50 — forked from ghalusa/youtube_id_regex.php
Extract the YouTube Video ID from a URL in PHP
<?php
// Here is a sample of the URLs this regex matches: (there can be more content after the given URL that will be ignored)
// http://youtu.be/dQw4w9WgXcQ
// http://www.youtube.com/embed/dQw4w9WgXcQ
// http://www.youtube.com/watch?v=dQw4w9WgXcQ
// http://www.youtube.com/?v=dQw4w9WgXcQ
// http://www.youtube.com/v/dQw4w9WgXcQ
// http://www.youtube.com/e/dQw4w9WgXcQ
// http://www.youtube.com/user/username#p/u/11/dQw4w9WgXcQ
@zorca
zorca / remove-woocommerce-styles-scripts.php
Created January 18, 2019 09:55 — forked from gregrickaby/remove-woocommerce-styles-scripts.php
Remove WooCommerce styles and scripts.
<?php
//* Do NOT include the opening php tag shown above. Copy the code shown below into functions.php
/**
* Manage WooCommerce styles and scripts.
*/
function grd_woocommerce_script_cleaner() {
// Remove the generator tag
remove_action( 'wp_head', array( $GLOBALS['woocommerce'], 'generator' ) );
@zorca
zorca / bootstrap-4-sass-mixins-cheat-sheet.scss
Created February 6, 2019 23:19 — forked from anschaef/bootstrap-4-sass-mixins-cheat-sheet.scss
Bootstrap 4 Sass Mixins [Cheat sheet with examples]
/* -------------------------------------------------------------------------- */
// All Bootstrap 4 Sass Mixins [Cheat sheet]
// Updated to Bootstrap v4.1.x
// @author https://anschaef.de
// @see https://github.com/twbs/bootstrap/tree/v4-dev/scss/mixins
/* -------------------------------------------------------------------------- */
// Grid variables
$grid-columns: 12 !default;
$grid-gutter-width: 30px !default;
###########################################
# Constants, set and forget
###########################################
# temp storage for the wordpress tarball
TMP_STORAGE=/home/USER/wptemp
# web root for the wordpress site
WWWROOT=/var/www
# Privileged db use/pwd for creating database and granting rights