Skip to content

Instantly share code, notes, and snippets.

View almone's full-sized avatar

Sergey Arustamov almone

View GitHub Profile
@almone
almone / dabblet.css
Created December 24, 2012 00:11
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
background: #f06;
background: linear-gradient(45deg, #f06, yellow);
min-height: 100%;
@almone
almone / dabblet.css
Created April 22, 2013 22:11
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
background: #f06;
background: linear-gradient(45deg, #f06, yellow);
min-height: 100%;
@almone
almone / dabblet.css
Created November 17, 2013 01:06 — forked from LeaVerou/dabblet.css
Google-style progress indicator (process)
/**
* Google-style progress indicator (process)
*/
.progress {
display: inline-block;
font-size: 50px; /* Size of the progress indicator */
width: 1em;
height: 1em;
border: 0 solid grey;
@almone
almone / 0_reuse_code.js
Last active August 29, 2015 14:20
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@almone
almone / javascript_resources.md
Last active August 29, 2015 14:20 — forked from jookyboi/javascript_resources.md
Here are a set of libraries, plugins and guides which may be useful to your Javascript coding.

Libraries

  • jQuery - The de-facto library for the modern age. It makes things like HTML document traversal and manipulation, event handling, animation, and Ajax much simpler with an easy-to-use API that works across a multitude of browsers.
  • Backbone - Backbone.js gives structure to web applications by providing models with key-value binding and custom events, collections with a rich API of enumerable functions, views with declarative event handling, and connects it all to your existing API over a RESTful JSON interface.
  • AngularJS - Conventions based MVC framework for HTML5 apps.
  • Underscore - Underscore is a utility-belt library for JavaScript that provides a lot of the functional programming support that you would expect in Prototype.js (or Ruby), but without extending any of the built-in JavaScript objects.
  • lawnchair - Key/value store adapter for indexdb, localStorage
@almone
almone / css_resources.md
Last active August 29, 2015 14:20 — forked from jookyboi/css_resources.md
CSS libraries and guides to bring some order to the chaos.

Libraries

  • 960 Grid System - An effort to streamline web development workflow by providing commonly used dimensions, based on a width of 960 pixels. There are two variants: 12 and 16 columns, which can be used separately or in tandem.
  • Compass - Open source CSS Authoring Framework.
  • Bootstrap - Sleek, intuitive, and powerful mobile first front-end framework for faster and easier web development.
  • Font Awesome - The iconic font designed for Bootstrap.
  • Zurb Foundation - Framework for writing responsive web sites.
  • SASS - CSS extension language which allows variables, mixins and rules nesting.
  • Skeleton - Boilerplate for responsive, mobile-friendly development.

Guides

@almone
almone / gist:0b7129c5dee3757aee26
Created December 3, 2015 03:28 — forked from mikejolley/gist:3012597
WooCommerce - Manipulate the states
/**
* Code goes in functions.php or a custom plugin. Replace XX with the country code your changing.
*/
add_filter( 'woocommerce_states', 'custom_woocommerce_states' );
function custom_woocommerce_states( $states ) {
$states['XX'] = array(
'XX1' => 'State 1',
'XX2' => 'State 2'
@almone
almone / gist:2cecbe50538f567ad4de
Created December 8, 2015 09:00
WooCommerce Minimum Order Amount
// Minimum Order Amount - from 3000
add_action( 'woocommerce_checkout_process', 'wc_minimum_order_amount' );
add_action( 'woocommerce_before_cart' , 'wc_minimum_order_amount' );
function wc_minimum_order_amount() {
// Set this variable to specify a minimum order value
$minimum = 3000;
if ( WC()->cart->total < $minimum ) {
@almone
almone / plugin_extends.php
Created December 11, 2015 06:31 — forked from jonathanbardo/plugin_extends.php
Override/Extends a plugin
<?php
/**
* Plugin Name: Extend a plugin
* Version: 0.0.1
* Author: Jonathan Bardo
* License: GPLv2+
* Author URI: http://jonathanbardo.com
*/
class Test extends Date_Range_Filter {
@almone
almone / gist:5c7da2870a720df52247
Last active October 20, 2018 06:27
Clean wp_head from junk
// Clean wp_head from junk
add_action('after_setup_theme', 'start_cleanup');
function start_cleanup() {
// Initialize the cleanup
add_action('init', 'cleanup_head');
}
// WordPress cleanup function
function cleanup_head() {
remove_action('wp_head', 'rsd_link'); // EditURI link