Skip to content

Instantly share code, notes, and snippets.

View piouPiouM's full-sized avatar
🪄
Tweaking my Neovim configuration

Mehdi Kabab piouPiouM

🪄
Tweaking my Neovim configuration
View GitHub Profile
" vim-plug
" Press `gx` to open the GitHub URL for a plugin or a commit with the default browser.
" From https://github.com/junegunn/vim-plug/wiki/extra#gx-to-open-github-urls-on-browser
function! s:plug_gx()
let line = getline('.')
let sha = matchstr(line, '^ \X*\zs\x\{7,9}\ze ')
let name = empty(sha) ? matchstr(line, '^[-x+] \zs[^:]\+\ze:')
\ : getline(search('^- .*:$', 'bn'))[2:-2]
let uri = get(get(g:plugs, name, {}), 'uri', '')
if uri !~ 'github.com'
$ sass -t expanded test01.scss
test01.scss:10 DEBUG: list of 3 values:
test01.scss:14 DEBUG: - (string) a
test01.scss:14 DEBUG: - (color) #bada55
test01.scss:14 DEBUG: - (number) 42
test01.scss:10 DEBUG: list of 2 values:
test01.scss:14 DEBUG: - (bool) false
test01.scss:14 DEBUG: - (string) yummy
test01.scss:14 DEBUG: (number) 14px
test01.scss:14 DEBUG: (string) gloubiboulga
@piouPiouM
piouPiouM / .gitconfig
Created March 23, 2017 10:15
My Git configuration
[user]
name = Mehdi Kabab
[color]
ui = auto
[core]
excludesfile = ~/.config/git/ignore
editor = nvim
whitespace = -trailing-space
# Make `git rebase` safer on macOS
@piouPiouM
piouPiouM / SassMeister-input-HTML.html
Last active May 14, 2016 21:31
Generated by SassMeister.com.
<div class="message status">
Sass 3.3 envoie du poney !
</div>
<div class="message warning">
Une fois tombé dans Sass,
il est difficile de revenir en arrière !
</div>
<div class="message error">
LESS c'est senSass :]
</div>
@piouPiouM
piouPiouM / SassMeister-input.scss
Last active March 25, 2016 14:19 — forked from Kozlika/SassMeister-input.scss
Generated by SassMeister.com.
// ----
// Sass (v3.4.21)
// Compass (v1.0.3)
// ----
// Settings
// ===========================================
$fonts-map: (
'sourcesanspro':
@piouPiouM
piouPiouM / SassMeister-input.scss
Created January 19, 2016 14:52
Generated by SassMeister.com.
// ----
// libsass (v3.3.2)
// ----
%title-alpha {
font-size: 3rem;
color: blue;
%title-rank {
color: yellow;
}
@piouPiouM
piouPiouM / x-em.scss
Last active December 18, 2015 08:48
A #sass function to convert pixel font-sizes to em's.
// The base font size.
$base-font-size: 16px !default;
// Convert `$to` (assumed px) to em compared to a given `$context` (assumed px)
@function x-em($to, $context: $base-font-size) {
// Do not break the natural behavior of the null variables.
@if 'null' == type-of($to) {
@return $to;
}
<?php
/**
* Promote the theme stylesheets.
*
* Implements hook_css_alter().
*
* @param array &$css
* An array of all CSS items (files and inline CSS) being requested on the page.
* @param array $options
* (optional) An associative array containing: