Skip to content

Instantly share code, notes, and snippets.

View iods's full-sized avatar

Rye Miller iods

View GitHub Profile
@iods
iods / .gitignore
Created July 8, 2016 15:42
My .gitignore declaration for projects
# -------------------------------------------------------------------------- #
# .gitignore Template - Copyright (c) 2016 Rye Miller #
# -------------------------------------------------------------------------- #
CHANGELOG.md
CONTRIBUTING.md
!.gitattributes
!.gitignore
# .htaccess
/LICENSE
@iods
iods / properties.css
Created July 7, 2016 01:40
My CSS declaration order
/** -------------------------------------------------------------------------- *\
* Version 0.1.0 [2016-07-04]
*
* Identifies the proper way for declaring the order of CSS properties
*
* Project : Acuity
* Markup : order.css
* Author : Rye Miller <rye@drkstr.io>
* Version : 0.1.0
* Created : 2016-07-04
@iods
iods / Document.css
Last active January 30, 2016 20:00
How I document my CSS before preprocessing.
/**---------------------------------------------------------------------------
* {{Project}} Stylesheet
*
* {{Description for the stylesheet from a high-level}}
*
* Markup: {{filename.css}}
* Project: {{Project}}
* Version: {{Version}} {{Created On}}
* Description: {{Project Description}}
* Website: {{Project Git Repository}}
@iods
iods / DOCTYPE.html
Last active November 18, 2022 04:44
My sections of marking up an HTML page.
<!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]--><!-- Le fav and touch icons -->
@iods
iods / Observer.php
Last active November 29, 2015 03:48
Cache blocks in Magento.
<?php
/**
* Observer to core_block_abstract_to_html_before
*
* Specifies required cache information like key (block id)
* and tag (Mage_Cms_Model_Block::CACHE_TAG).
*/
public function cmsBlockCache($observer)
{
if ($block instanceof Mage_Cms_Block_Widget_Block || $block instanceof Mage_Cms_Block_Block)
@iods
iods / .gitignore
Last active July 27, 2016 15:13
Magento ignore file for past and up to v1.9.2.4
# Temp/ignore file types.
*.diff
*.err
*.orig
*.log
*.rej
*.swo
*.swp
*.vi
*~
@iods
iods / clearSessions.sh
Created November 28, 2015 02:02
Remove Magento sessions (file stored) in a certain specified timeframe. Run through a cron job.
#!/bin/bash
# Remove Sessions older than specified time.
DIR=/var/www/magento/var/session/
RANGE=30
/usr/bin/find $DIR -depth -mtime +$RANGE -exec rm -rf '{}' \;
@iods
iods / JIRA.properties
Created September 30, 2015 22:06
JIRA Gist for Properties - Defaults
# This file contains defaults for application properties
#
# The keys must match up with the keys found in APKeys.java
#
# NB - the values in this file are not automatically
# handed to the application. The special call
# ApplicationProperties().getDefaultBackedString()
# will return the values in this file if they are not found
# in the database
@iods
iods / cleanup.sql
Created August 15, 2015 00:47
Cleanup for Magento DB (Orders, Customers)
SET FOREIGN_KEY_CHECKS=0;
##############################
# SALES RELATED TABLES
##############################
TRUNCATE `sales_flat_creditmemo`;
TRUNCATE `sales_flat_creditmemo_comment`;
TRUNCATE `sales_flat_creditmemo_grid`;
TRUNCATE `sales_flat_creditmemo_item`;
TRUNCATE `sales_flat_invoice`;
@iods
iods / bash-helpers.md
Last active November 18, 2022 03:32
[DevOps] Bash Helpers

as