Skip to content

Instantly share code, notes, and snippets.

View cabans's full-sized avatar
:octocat:

Abel Cabans cabans

:octocat:
View GitHub Profile
@cabans
cabans / emojicommits.bash_profile
Last active October 29, 2019 08:27
Own modification of Emoji log for Git commits
#.# Better Git Logs.
### Using EMOJI-LOG (https://github.com/ahmadawais/Emoji-Log).
# Git Commit, Add all and Push — in one step.
function gcap() {
git commit -m "$*"
}
# NEW.
function gnew() {
// Atom settings
@cabans
cabans / Emmet.sublime-settings
Created April 26, 2017 07:29
Emmet Sublime Settings
{
"preferences": {
"sass.propertyEnd": ";"
}
}
@cabans
cabans / consolelog-snippet.xml
Last active February 12, 2021 14:02
Add console log autocompletion snippet to Sublime Text
<snippet>
<!-- put this file in /packages/User/<Folder Name>/console_log.sublime-snippet then restart your Sublime Text -->
<content><![CDATA[console.log($1);$0]]></content>
<tabTrigger>log</tabTrigger>
<scope>text.html,source.js</scope>
<description>console.log()</description>
</snippet>
@cabans
cabans / theia_nav_walker.php
Last active March 13, 2016 23:05
Walker handler for WordPress navigation menus to remove white spaces between <li> tags
<?php
/**
* > Nav menus without break lines
* Cleans white spaces and breaklins after li element
*/
class Theia_Nav_Menu_Walker extends Walker_Nav_Menu
{
function end_el( &$output, $item, $depth = 0, $args = array() ) {
$output .= '</li>';
}
@cabans
cabans / gist:2eb3792b25a57d01634b
Created January 12, 2016 13:49
Netflix Hidden Categories
Netflix category codes:
Action & Adventure: 1365
Action Comedies: 43040
Action Sci-Fi & Fantasy: 1568
Action Thrillers: 43048
Adult Animation: 11881
Adventures: 7442
African Movies: 3761
Alien Sci-Fi: 3327
@cabans
cabans / clean-paragraphs.php
Last active November 18, 2015 16:46
WordPress - Clean paragraphs in Shortcodes
<?php
// Move priority of Auto Paragraph function
remove_filter( 'the_content', 'wpautop' );
add_filter( 'the_content', 'wpautop' , 12);
// Shortcode function
function shortcode_function( $atts, $content ) {
// Clean spaces and add paragraphs
$content = wpautop(trim($content));
@cabans
cabans / is_mac.js
Created August 11, 2015 13:18
Check if OS is Mac OS X
// Check if OS client is Mac OS X
if(navigator.platform.match('Mac') !== null) {
$('body').addClass('macosx');
}
@cabans
cabans / CSScomb.sublime-settings
Created July 16, 2015 09:44
Sublime Text - CSS Comb Settings
{
// Full list of supported options and acceptable values can be found here:
// https://github.com/csscomb/csscomb.js/blob/master/doc/options.md
"config": {
// Whether to add a semicolon after the last value/mixin.
"always-semicolon": false,
// Set indent for code inside blocks, including media queries and nested rules.
"block-indent": " ",
@cabans
cabans / .htaccess
Last active June 8, 2022 12:47
.htaccess WordPress securize and optimization
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>