gitflow | git |
---|---|
git flow init |
git init |
git commit --allow-empty -m "Initial commit" |
|
git checkout -b develop master |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(1) Define the custom filter | |
me.approvedFilter = Ext.create('Ext.util.Filter', { | |
id: 'approvedFilter', | |
filterFn: function (record) { | |
return !record.data.approved; | |
} | |
}); | |
(2) In the grid panel, define the checkbox in the toolbar |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
target_branch="production" | |
working_tree="PATH_TO_DEPLOY" | |
while read oldrev newrev refname | |
do | |
branch=$(git rev-parse --symbolic --abbrev-ref $refname) | |
if [ -n "$branch" ] && [ "$target_branch" == "$branch" ]; then | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Usage: | |
// get_id_by_slug('any-page-slug'); | |
function get_id_by_slug($page_slug) { | |
$page = get_page_by_path($page_slug); | |
if ($page) { | |
return $page->ID; | |
} else { | |
return null; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
directory = ARGV.shift || Dir.pwd | |
$dont_get_into = ['.','..'] | |
$allowed = { | |
'Ruby' => '.rb', | |
'Ruby HTML Templates' => '.html.erb', | |
'YAML' => '.yml', | |
'RDoc' => '.rdoc', | |
'HTML' => '.html', | |
'Javascript' => '.js', | |
'CSS' => '.css', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'koala' # gem install koala --no-ri --no-rdoc | |
# create a facebook app and get access token from here | |
# https://developers.facebook.com/tools/explorer | |
# select "groups", "photos" when authenticating | |
oauth_access_token = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' | |
group_filtering_words = ['ruby'] | |
image_path = 'image.png' #change to your image path | |
message = 'My Cool image.' # your message |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ----------------------------------------------------------------- | |
# .gitignore for WordPress | |
# Bare Minimum Git | |
# http://ironco.de/bare-minimum-git/ | |
# ver 20150227 | |
# | |
# This file is tailored for a WordPress project | |
# using the default directory structure | |
# | |
# This file specifies intentionally untracked files to ignore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /etc/nginx/global/php-restrictions.conf | |
# Don't throw any errors for missing favicons and don't display them in the logs | |
location = /favicon.ico { | |
log_not_found off; | |
access_log off; | |
} | |
# Don't log missing robots or show them in the nginx logs | |
location = /robots.txt { | |
allow all; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$store_id = 5; | |
$csv_filepath = "newsletter.csv"; | |
$email_csv_column_index = 2; | |
$csv_delimiter = ','; | |
$csv_enclosure = '"'; | |
$magento_path = __DIR__; | |
require "{$magento_path}/app/Mage.php"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$store_id = Mage::app()->getStore()->getId(); | |
$collection = Mage::getModel("catalog/product")->getCollection(); | |
$collection->setStoreId($store_id); | |
$collection->addStoreFilter($store_id); | |
//$collection->addAttributeToSelect("*"); | |
$collection->addAttributeToFilter('status', array('in' => array(Mage_Catalog_Model_Product_Status::STATUS_ENABLED))); | |
$collection->addAttributeToFilter('visibility', array('in '=> array(Mage_Catalog_Model_Product_Visibility::VISIBILITY_IN_CATALOG, Mage_Catalog_Model_Product_Visibility::VISIBILITY_BOTH))); | |
Mage::getSingleton("cataloginventory/stock")->addInStockFilterToCollection($collection); |