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 gulp = require('gulp'), | |
watch = require('gulp-watch'), | |
// This will keeps pipes working after error event | |
plumber = require('gulp-plumber'), | |
// linting | |
jshint = require('gulp-jshint'), | |
stylish = require('jshint-stylish'), |
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 obj = {b: 3, c: 2, a: 1}; | |
_.sortKeysBy(obj); | |
// {a: 1, b: 3, c: 2} | |
_.sortKeysBy(obj, function (value, key) { | |
return value; | |
}); | |
// {a: 1, c: 2, b: 3} |
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
-- This code is fork from https://gist.github.com/oliveratgithub/ | |
-- Open in AppleScript Editor and save as Application | |
-- ------------------------------------------------------------ | |
--this is required to break the filename into pieces (separate name and extension) | |
set text item delimiters to "." | |
tell application "Finder" | |
set all_files to every item of (choose file with prompt "Choose the Files you'd like to rename:" with multiple selections allowed) as list | |
display dialog "New file name:" default answer "" | |
set new_name to text returned of result | |
--now we start looping through all selected files. 'index' is our counter that we initially set to 1 and then count up with every file. |