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
function saveForWebPNG(doc, folder, filename) { | |
var sfwOptions = new ExportOptionsSaveForWeb(); | |
sfwOptions.format = SaveDocumentType.PNG; | |
sfwOptions.PNG8 = false; | |
doc.exportDocument(new File(folder + '/' + filename), ExportType.SAVEFORWEB, sfwOptions); | |
} | |
function main() { | |
var inputFolder = Folder.selectDialog('トリミングしたい画像の入ったフォルダを選択してください'); |
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
# coding: utf-8 | |
require 'mini_exiftool' | |
require 'find' | |
Find.find('files') do |f| | |
next unless File.file? f | |
begin | |
exif = MiniExiftool.new f | |
rescue |
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
# coding: utf-8 | |
require 'find' | |
require 'fileutils' | |
Find.find('files') do |f| | |
next unless File.file? f | |
size = File.size?(f) | |
if size.nil? || size < 10000 # 10KB | |
puts f |
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 fs = require('fs'); | |
var glob = require('glob'); | |
var path = require('path'); | |
var Exif = require('exif').ExifImage; | |
var imageDir = 'photos/'; | |
glob('Masters/**/*', function(err, files) { | |
if (err) throw err; | |
files.forEach(function(file) { |
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
# coding: utf-8 | |
require 'find' | |
require 'time' | |
Find.find 'files' do |f| | |
if File.basename(f).match /\d{4}-\d{2}-\d{2} \d{2}\.\d{2}\.\d{2}/ | |
originaltime = Time.parse File.basename(f, File.extname(f)).gsub '.', ':' | |
File.utime File.atime(f), originaltime, f unless originaltime.nil? | |
end |
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
find . -type d -exec chmod 755 {} \; | |
find . -type f -exec chmod 644 {} \; |
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
# editorconfig.org | |
root = true | |
[*] | |
end_of_line = lf | |
charset = utf-8 | |
indent_size = 2 | |
indent_style = space | |
insert_final_newline = true |
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
sudo find . -name ".DS_Store" -depth -exec rm {} \; |
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
sublime.log_commands(True) |
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 | |
// 言語、文字コードを設定する | |
mb_language('uni'); | |
mb_internal_encoding('UTF-8'); | |
function map_htmlspecialchars($request) | |
{ | |
return array_map(function ($value) { | |
return is_array($value) ? | |
map_htmlspecialchars($value) : |
OlderNewer