Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View xavierartot's full-sized avatar

Xavier Artot xavierartot

  • Paris
View GitHub Profile
@sdkks
sdkks / iterm_nvim.AppleScript
Last active May 13, 2023 14:16
Open File with iTerm2 + nvim on OSX using Automator
on run {input, parameters}
-- If run without input, open random file at $HOME
try
set filename to POSIX path of input
on error
set filename to "nvim-" & (do shell script "date +%F") & "__" & (random number from 1000 to 9999) & ".txt"
end try
-- Set your editor here
set myEditor to "/usr/local/bin/nvim"
-- Open the file and auto exit after done
@xavierartot
xavierartot / woocommerce-sage-template-part-overrides.md
Created June 12, 2017 14:01 — 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

@christiangenco
christiangenco / download_egghead_videos.md
Last active January 29, 2024 03:16 — forked from ldong/download_egghead_videos.md
download egghead videos
@drawcard
drawcard / woocommerce-sage-template-part-overrides.md
Last active August 16, 2021 08:39
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

<?php
// For use with Sagextras (https://github.com/storm2k/sagextras)
?>
<header class="banner navbar navbar-default navbar-static-top" role="banner">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target=".navbar-collapse">
<span class="sr-only"><?= __('Toggle navigation', 'sage'); ?></span>
<span class="icon-bar"></span>
@iamdey
iamdey / README.md
Last active August 29, 2015 14:20
configuration de vim pour le développement

config vim pour le développement par Patrice FERLET

Ce script reprend les différentes commandes présentés dans la vidéo suivante :

https://www.youtube.com/watch?v=srGrhjOEx7M

Pré-requis

Le plugin Tagbar dépend de ctags :

@retlehs
retlehs / header.php
Created April 29, 2015 04:55
Sage header template for Bootstrap top navbar component
<?php
// This file assumes that you have included the nav walker from https://github.com/twittem/wp-bootstrap-navwalker
// somewhere in your theme.
?>
<header class="banner navbar navbar-default navbar-static-top" role="banner">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target=".navbar-collapse">
<span class="sr-only"><?= __('Toggle navigation', 'sage'); ?></span>
@roblevintennis
roblevintennis / gist:865de775fb988bfad9a1
Last active May 7, 2017 20:20
Responsive Inline SVGs Sass Mixin
$svg-container-namespace: '.svg-container';
//Give 'em' 1:1 responsive container by default
#{$svg-container-namespace} {
display: inline-block;
position: relative;
height: 0;
width: 100%;
padding: 0;
//Default for 1:1 aspect ratio
@juanpabloaj
juanpabloaj / tabnext_or_buffernext.vim
Created February 17, 2015 00:55
tabnext or buffernext
nnoremap <silent>gt : exec tabpagenr('$') == 1 ? 'bn' : 'tabnext'<CR>
nnoremap <silent>gT : exec tabpagenr('$') == 1 ? 'bp' : 'tabprevious'<CR>
@averyvery
averyvery / spread.sass
Last active May 16, 2020 22:07
spread.sass
// strip-units required by spread mixin
// http://stackoverflow.com/questions/12328259/how-do-you-strip-the-unit-from-any-number-in-sass
@function strip-units($number)
@return $number / ($number * 0 + 1)
// pow and sqrt required by ease function
// adapted from https://github.com/at-import/Sassy-math/blob/master/sass/math.scss
@function pow($base, $exponent)
$value: $base