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
docker run --rm \ | |
-it \ | |
-v $(pwd):/input/ \ | |
-u 0 \ | |
pmsipilot/docker-compose-viz \ | |
render -m image |
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 | |
set -e | |
if [ "$1" != "" ]; then | |
FNAME=$(mktemp /tmp/foo.XXXXXXXXX) | |
cat <<EOSQL | mysql -u root -p $1 | sed -e s/\.[^\.]*$/\*/ | sed -e "s/^/ls /" > $FNAME | |
SELECT distinct files.meta_value AS '' | |
FROM | |
wp_posts posts | |
INNER JOIN wp_posts attachments ON posts.ID = attachments.post_parent |
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 app = angular.module("modalFormApp", ['ui.bootstrap']); | |
app.controller("modalAccountFormController", ['$scope', '$modal', '$log', | |
function ($scope, $modal, $log) { | |
$scope.showForm = function () { | |
$scope.message = "Show Form Button Clicked"; | |
console.log($scope.message); | |
var modalInstance = $modal.open({ |
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
angular | |
.module('myapp', [...]) | |
.filter('iconify', ['$sce', function($sce){ | |
return function(input, type){ | |
var iconType = 'fa-file-o'; | |
if( input ){ | |
if( input.startsWith('image/')){ | |
iconType = 'fa-file-pdf-o'; | |
} else if (input == 'application/pdf') { | |
iconType = 'fa-file-image-o'; |
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 if ( Mage::getModel('cataloginventory/stock_item')->loadByProduct($_product)->getEnableQtyIncrements() ){ ?> | |
<select class="input-text qty" name="qty" id="qty"> | |
<?php $i = (Mage::getModel('cataloginventory/stock_item')->loadByProduct($_product)->getMinSaleQty()?Mage::getModel('cataloginventory/stock_item')->loadByProduct($_product)->getMinSaleQty():1); ?> | |
<?php do { ?> | |
<option value="<?php echo $i?>"> | |
<?php echo $i?> | |
<?php $i+= Mage::getModel('cataloginventory/stock_item')->loadByProduct($_product)->getQtyIncrements() ?> | |
</option> | |
<?php } while ($i <= (int)Mage::getModel('cataloginventory/stock_item')->loadByProduct($_product)->getMaxSaleQty()) ?> | |
</select> |
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 | |
if [ -z "$1" ]; then | |
echo "Usage ./proj <project name>" | |
exit 2; | |
fi | |
if [ "$(whoami)" != "root" ]; then | |
echo "Sorry, you are not root." | |
exit 1 | |
fi |
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 | |
wget http://automation.whatismyip.com/n09230945.asp -O - -o /dev/nul |
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 | |
DBUSR=**** | |
DBPWD=**** | |
# You should be root | |
if [ "$(whoami)" != "root" ]; then | |
echo "Sorry, you are not root." | |
exit 1 | |
fi |