Skip to content

Instantly share code, notes, and snippets.

View Amakata's full-sized avatar

Yoshihisa Amakata Amakata

View GitHub Profile
<?php
/**
* Generate modman file from Magento Connect 2.0 package.xml
*
* Usage:
*
* php package2modman.php path/to/package.xml > path/to/modman
*
*/
require_once(__DIR__ . "/../www/app/Mage.php");
@ottonet
ottonet / makemod
Last active April 12, 2023 14:57
osx compatible magento modman generator
for i in `find . -type f | grep -v \.git | grep -v \.DS_Store | grep -v "^.$" | grep -v "modman" | grep -v "composer.json" | grep -v \.txt | grep -v \.pdf | sed 's/\.\///'`; do echo ${i} ${i}; done > modman
@kixorz
kixorz / aws_autoscaling_cron.rb
Created March 20, 2013 22:41
Running cron jobs in AWS Auto Scaling group is tricky. When you deploy the same code and configuration to all instances in the group, cron job would run on all of them. You may not want that. This script detects the first instance in the group and allows only this instance to run the job. IAM user used by this script needs to have permissions to…
#!/usr/bin/env ruby
require 'syslog'
require 'net/http'
require 'aws-sdk'
Syslog.open
AWS.config({
:access_key_id => '<iam user key>',
:secret_access_key => '<iam user secret>'