Skip to content

Instantly share code, notes, and snippets.

View CatinhoCR's full-sized avatar

Cato CatinhoCR

  • Costa Rica
  • 04:29 (UTC -06:00)
View GitHub Profile
@DevinWalker
DevinWalker / woocommerce-optimize-scripts.php
Last active March 24, 2025 13:09
Only load WooCommerce scripts on shop pages and checkout + cart
/**
* Optimize WooCommerce Scripts
* Remove WooCommerce Generator tag, styles, and scripts from non WooCommerce pages.
*/
add_action( 'wp_enqueue_scripts', 'child_manage_woocommerce_styles', 99 );
function child_manage_woocommerce_styles() {
//remove generator meta tag
remove_action( 'wp_head', array( $GLOBALS['woocommerce'], 'generator' ) );
@mattes
mattes / wp-cli-install-with-brew.sh
Created October 18, 2013 13:45
Installing WP-CLI under Mac OS with Homebrew
#!/usr/bin/env
# curl https://gist.github.com/mattes/7041760/raw/wp-cli-install-with-brew.sh | bash
brew tap homebrew/dupes
brew tap josegonzalez/homebrew-php
brew install wp-cli
@kinnala
kinnala / gist:6376196
Created August 29, 2013 09:50
Soccerway API scraping example
import urllib2
import json
import re
class SoccerwayTeamMatches:
def __init__(self, teamId):
self.teamId = str(teamId)
self.data = {'all': [], 'home': [], 'away': []}
@ingdir
ingdir / gist:0b211b9253c376f9cfa5
Last active December 3, 2023 11:47
BEM Cheatsheet

BEM Cheatsheet

BLOCK

Block encapsulates a standalone entity that is meaningful on its own.

While blocks can be nested and interact with each other, semantically they remain equal; there is no precedence or hierarchy.

Holistic entities without DOM representation (such as controllers or models) can be blocks as well.

@dypsilon
dypsilon / frontendDevlopmentBookmarks.md
Last active March 27, 2025 08:16
A badass list of frontend development resources I collected over time.
@Rarst
Rarst / composer.json
Last active December 18, 2024 08:20
Test project for WordPress stack via Composer
{
"name" : "rarst/install-test",
"description" : "Test project for WordPress stack via Composer",
"authors" : [
{
"name" : "Andrey Savchenko",
"homepage": "http://www.Rarst.net/"
}
],
"type" : "project",
@thomseddon
thomseddon / gist:4703968
Last active September 9, 2024 04:24
Auto Expanding/Grow textarea directive for AngularJS
/**
* The MIT License (MIT)
*
* Copyright (c) 2013 Thom Seddon
* Copyright (c) 2010 Google
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell