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 doc = app.activeDocument; | |
var layers = doc.layers; | |
var lnum = layers.length; | |
for(var i = 0; i < lnum; i++){ | |
layers[i].visible = false; | |
} |
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 r = {}; | |
r.goldpoint = 7; | |
r.silverpoint = 3; | |
r.copperpoint = 1; | |
r.$table = $(".tableForm").find("tbody"); | |
$.ajax({ | |
url: "http://london.yahoo.co.jp/medal/?page=2", | |
async: false, |
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
if(!Function.prototype.hasOwnProperty("bind")){ | |
Function.prototype.bind = function(){ | |
var func = this; | |
var t = arguments[0]; | |
var len = arguments.length; | |
var newargary = []; | |
for(var i = 1; i < len; i++){ | |
newargary.push(arguments[i]); | |
} | |
return function(){ |
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 djs = {};//Default setting JavaScript | |
djs.w = window; | |
djs.d = djs.w.document; | |
//IEでconsole未定義エラーを出さないようにする。 | |
if(!window.console){ | |
(function(win){ | |
var names = [ 'assert', 'clear', 'count', 'debug', 'dir', 'dirxml', 'error', 'exception', 'group', 'groupCollapsed', 'groupEnd', 'info', 'log', 'profile', 'profileEnd', 'table', 'time', 'timeEnd', 'timeStamp', 'trace', 'warn' ]; | |
var consoleMock = {}; |
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 a = document.getElementsByClassName("button"); | |
for(var i in a){ | |
if(a[i].nodeName === "DIV"){ | |
a[i].className = "button disabled"; | |
} | |
} |
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 [ $# -ne 3 ]; then | |
echo "Usage: git diff-zip <archive_name> <oldCommit> <newCommit>" | |
exit 1 | |
fi | |
git archive --format=zip --prefix=$1/ $3 `git diff --name-only $2 $3` -o ../$1.zip | |
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 textFrame = activeDocument.selection[0]; | |
if(textFrame.characters.length > 0){ | |
var textContent = textFrame.contents; | |
var fonts = app.textFonts; | |
var len = fonts.length; | |
var width = 270; | |
var height = 12; |