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
var Promise = require('bluebird'); | |
var myType = 'mytype'; | |
var nativePromise = new Promise(function (resolve, reject) { | |
sails.models[mytype].native(function (err, collection) { | |
if (err) { | |
return reject(err); | |
} | |
var pipeline = []; //some pipeline | |
collection.aggregate(pipeline).toArray(function (err, itemList) { |
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 | |
/** | |
* Magento | |
* | |
* NOTICE OF LICENSE | |
* | |
* This source file is subject to the Open Software License (OSL 3.0) | |
* that is bundled with this package in the file LICENSE.txt. | |
* It is also available through the world-wide-web at this URL: | |
* http://opensource.org/licenses/osl-3.0.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
BUILDDIR=$1 | |
CONNECTDIR="$BUILDDIR/public/var/connect" | |
PACKAGEXML="$CONNECTDIR/package.xml" | |
echo "Using package.xml: $PACKAGEXML" | |
cd $BUILDDIR/public | |
if [ -f "$PACKAGEXML" ]; | |
then | |
./mage package $PACKAGEXML |
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 | |
/** | |
* Magento | |
* | |
* NOTICE OF LICENSE | |
* | |
* This source file is subject to the Open Software License (OSL 3.0) | |
* that is bundled with this package in the file LICENSE.txt. | |
* It is also available through the world-wide- web at this URL: | |
* http://opensource.org/licenses/osl-3.0.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
#!/bin/bash | |
ps -ef | grep "[c]om.sun.enterprise.glassfish.bootstrap.ASMain" | awk '{print $2}' | xargs kill -9 |
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 | |
# | |
# This script fixes permissions on Magento subtree | |
# | |
# Usage: | |
# cd to virtual host folder | |
# run script by issuing utils/fix_permissions.sh . command | |
# | |
# Author Sven Varkel <[email protected]> | |
# Copyright 2013 MageFlow Ltd |
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 version 1.0-beta | |
# | |
# For the reference see the folder structure here: | |
# http://measure9.varkel.net/2013/10/setting-up-magento-development-environment-step-by-step-part-3-naming-and-structure/ | |
# | |
# System files, special files | |
# | |
.DS_Store | |
._* |
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 | |
# 1. list git branches | |
# 2. iterate thru branches | |
# 3. for each branch do git filter-branch --index-filter "git rm -rf --cached --ignore-unmatch FILENAME" HEAD | |
filepath=$1 | |
remove_large_files(){ | |
for branch in $(git branch) | |
do | |
echo "Removing ${filepath} from ${branch}" | |
git filter-branch -f --index-filter "git rm -rf --cached --ignore-unmatch ${filepath}" $branch |
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/sh | |
# | |
# Credits go to: http://article.gmane.org/gmane.comp.version-control.git/123050 | |
# | |
usage() { | |
echo "usage: `basename $0` [<limit>]" | |
exit 1 | |
} |
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 | |
# run in your app/etc folder | |
grep -o -P "<password><\!\[CDATA\[([\w]*)\]\]><\/password>" local.xml | sed -e 's|<password><\!\[CDATA\[||g' | sed -e 's|\]\]></password>||g' |