Skip to content

Instantly share code, notes, and snippets.

Roque Terrani riterrani

Block or report user

Report or block riterrani

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
# Target directory
echo "Finding and copying files and folders to $TARGET"
for i in $(git diff --name-only $1 $2)
# First create the target directory, if it doesn't exist.
mkdir -p "$TARGET/$(dirname $i)"
# Then copy over the file.
cp "$i" "$TARGET/$i"
View gist:d9cabb85e967a02c995c
$installer = $this;
$entityTypeId = $installer->getEntityTypeId('catalog_category');
$attributeSetId = $installer->getDefaultAttributeSetId($entityTypeId);
$attributeGroupId = $installer->getDefaultAttributeGroupId($entityTypeId, $attributeSetId);
$installer->addAttribute('catalog_category', 'new_cat_attrb', array(
'type' => 'int',
riterrani / 0_reuse_code.js
Last active Aug 29, 2015
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
View gist:e01a018432e709e721db
function endc( $array ) { return end( $array ); }
$file = fopen('bitstampUSD.csv', 'r');
$firstTime = 0;
$periods = array(
// "min5" => 300, // 5 minutes
// "min30" => 1800, // 30 minutes
// "hour1" => 3600, // 1 hour
// "hour6" => 21600, // 6 hour
You can’t perform that action at this time.