Skip to content

Instantly share code, notes, and snippets.

Eating an orange

Andrew yratof

Eating an orange
View GitHub Profile
jareware /
Last active June 1, 2023 05:57
Advanced SCSS, or, 16 cool things you may not have known your stylesheets could do

⇐ back to the gist-blog at

Advanced SCSS

Or, 16 cool things you may not have known your stylesheets could do. I'd rather have kept it to a nice round number like 10, but they just kept coming. Sorry.

I've been using SCSS/SASS for most of my styling work since 2009, and I'm a huge fan of Compass (by the great @chriseppstein). It really helped many of us through the darkest cross-browser crap. Even though browsers are increasingly playing nice with CSS, another problem has become very topical: managing the complexity in stylesheets as our in-browser apps get larger and larger. SCSS is an indispensable tool for dealing with this.

This isn't an introduction to the language by a long shot; many things probably won't make sense unless you have some SCSS under your belt already. That said, if you're not yet comfy with the basics, check out the aweso

malarkey / Contract Killer
Last active May 5, 2023 08:46
The latest version of my ‘killer contract’ for web designers and developers
View Contract Killer

When times get tough and people get nasty, you’ll need more than a killer smile. You’ll need a killer contract.

Used by 1000s of designers and developers Clarify what’s expected on both sides Helps build great relationships between you and your clients Plain and simple, no legal jargon Customisable to suit your business Used on countless web projects since 2008


jimsynz / rgb_spectrum.c
Created January 5, 2011 20:59
Arduino sketch to cycle an RGB LED through the colour spectrum.
View rgb_spectrum.c
const int redPin = 11;
const int greenPin = 10;
const int bluePin = 9;
void setup() {
// Start off with the LED off.
void loop() {
gregrickaby / remove-woocommerce-styles-scripts.php
Last active April 11, 2023 18:43
Remove WooCommerce styles and scripts.
View remove-woocommerce-styles-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' ) );
growdev / gist:b68e35b5c6e0856bdbf1
Created March 19, 2015 19:01
Delete all WooCommerce Products with wp-cli
View gist:b68e35b5c6e0856bdbf1
wp post list --field=ID --post_type=product | xargs wp post delete --force
arosenhagen /
Last active September 2, 2022 16:24
[magento] - code snippets

Magento Code Snippets

Download extension manually using mage

./mage config-set preferred_state stable
./mage clear-cache
./mage sync
./mage download community Module_Name
bradvin / get_current_post_type.php
Created March 5, 2012 18:48 — forked from mjangda/get_current_post_type.php
Get the current post_type context in the WordPress admin.
View get_current_post_type.php
* gets the current post type in the WordPress Admin
function get_current_post_type() {
global $post, $typenow, $current_screen;
//we have a post so we can just get the post type from that
if ( $post && $post->post_type )
return $post->post_type;
razwan / _baseline.scss
Created April 14, 2014 16:20
Aligning type to baseline the right way with SASS
View _baseline.scss
$base-font-size: 16px;
$base-line-height: 1.5;
// this value may vary for each font
// unitless value relative to 1em
$cap-height: 0.68;
@mixin baseline($font-size, $scale: 2) {
isGabe / wp_custom_title_placeholder_text.php
Last active February 25, 2019 21:28
WordPress: Custom placeholder text for custom post type title input box #snippet #WordPress
View wp_custom_title_placeholder_text.php
replacing the default "Enter title here" placeholder text in the title input box
with something more descriptive can be helpful for custom post types
place this code in your theme's functions.php or relevant file
Agnostic / git-pull-yosemite-fix
Last active May 8, 2018 11:43
/git-core/git-pull: line 11: git-sh-setup: No such file or directory (git pull Yosemite FIX)
View git-pull-yosemite-fix
// Open:
// Replace line 11 & 12
. git-sh-setup
. git-sh-i18n
// With this:
. /Applications/
. /Applications/