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
# 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
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
rsync -ahvu --delete --exclude=".*" public/ dev:/var/www/html/ | |
echo "\npublished: https://usagizmo.com/\n" |
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
<meta http-equiv="refresh" content="0;url=/next/" /> |
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
<Files ~ "^\.(htaccess|htpasswd)$"> | |
deny from all | |
</Files> | |
Options -Indexes | |
AuthUserFile /var/www/html/.htpasswd | |
# AuthGroupFile /dev/null | |
AuthName "Please enter your ID and password" | |
AuthType Basic | |
require valid-user | |
order deny,allow |
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