This file contains hidden or 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
(function($){ | |
// | |
//-------------------------------------- Model : Image | |
// | |
Image = Backbone.Model.extend({ | |
defaults: { | |
'delete' : false | |
} | |
}); | |
This file contains hidden or 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
Original source: http://andreafrancia.it/2010/03/understanding-the-output-of-rsync-itemize-changes.html | |
YXcstpoguax path/to/file | |
||||||||||| | |
`----------- the type of update being done:: | |
|||||||||| <: file is being transferred to the remote host (sent). | |
|||||||||| >: file is being transferred to the local host (received). | |
|||||||||| c: local change/creation for the item, such as: | |
|||||||||| - the creation of a directory | |
|||||||||| - the changing of a symlink, |
This file contains hidden or 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
mogrify -path ../resized -resize '1280x1200>' -quality 90 *.jpg | |
ridimensiona | |
find . -type f -name "*.jpg" -print0 | xargs -0 mogrify -resize '1280x1200>' -quality 90 | |
ridimensiona jpg in tutte le sottocartelle | |
find . -type f -name "*.jpg" -print0 | xargs -0 mogrify -resize '1280x1200>' -quality 80 | |
ridimensiona e croppa al centro |
This file contains hidden or 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
//Template: | |
//<input type="text" id="from" ng-model="filter.from" ng-change="getPage(1)" limitMinTo="to" jqdatepicker /> | |
//<input type="text" id="to" ng-model="filter.to" ng-change="getPage(1)" limitMaxTo="from" jqdatepicker /> | |
.directive('jqdatepicker', function () { | |
return { | |
restrict: 'A', | |
require: 'ngModel', | |
link: function (scope, element, attrs, ngModelCtrl) { | |
This file contains hidden or 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
$imagick = new \Imagine\Imagick\Imagine(); | |
$image = $imagick->open($image_path); | |
$image = $image->getImagick()->coalesceImages(); | |
foreach ($image as $frame) | |
{ | |
$frame->cropImage($crop_w,$crop_h,0,0); | |
$frame->thumbnailImage($resize_w,$resize_h); |
This file contains hidden or 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
ga('send','pageview', 'path_of_the_fake_page'); |
This file contains hidden or 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 | |
# create Dev Machine structure | |
function createStructure { | |
# TODO | |
# 1- check existing folders | |
# 2- ask user for overwriting | |
if [ -d manifests ] || | |
[ -d modules ] || | |
[ -d xdebug ] || |
This file contains hidden or 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
update wp_options set option_value = REPLACE(option_value,'www.old_site.com','www.new_site.com'); | |
update wp_postmeta set meta_value = REPLACE(meta_value,'www.old_site.com','www.new_site.com'); | |
update wp_posts set guid = REPLACE(guid,'www.old_site.com','www.new_site.com'), post_content = REPLACE(post_content,'www.old_site.com','www.new_site.com'); |
This file contains hidden or 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
# app/config.yml | |
framework: | |
... | |
session: | |
handler_id: %session_handler_id% # read from parameters.yml | |
#handler_id: session.handler.memcache # use service defined later | |
services: | |
# MEMCACHE SESSION MANAGEMENT SERVICE CONFIGURATION |
This file contains hidden or 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 | |
function createStructure { | |
if [ -f default_conf.js ]; then | |
echo -ne 'Structure already found, aborting' | |
else | |
echo 'Structure not found, creating...' | |
wget https://github.com/stormsson/protractor_scaffolding/archive/master.zip && | |
unzip master && | |
rm master.zip && |