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
on NPSaveAsPICT(theFile, theData) | |
try | |
set fh to open for access file theFile with write permission | |
write theData to fh | |
close access fh | |
on error errMsg number errNum | |
try | |
close access fh | |
end try | |
log {errNum, errMsg} |
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
## www to non-www redirect ## | |
server { | |
## all www sub-domain ## | |
server_name ~^www\.(.*\.example.com)$; | |
## redirect to non-www sub-domain ## | |
return 301 $scheme://$1$request_uri; | |
} |
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
## non-www to www redirect ## | |
server { | |
server_name *.hogehoge.com; | |
#if redirect hogehoge.com to www.hogehoge.com | |
#server_name .hogehoge.com; | |
return 301 $scheme://www.$host$request_uri; | |
} |
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 | |
uriLinks="http://s3.feedly.com/img/follows/" | |
URL="feedly-follow-rectangle-volume-big_2x.png"\ "feedly-follow-rectangle-volume-medium_2x.png"\ "feedly-follow-rectangle-volume-small_2x.png"\ "feedly-follow-square-volume_2x.png"\ "feedly-follow-rectangle-flat-big_2x.png"\ "feedly-follow-rectangle-flat-medium_2x.png"\ "feedly-follow-rectangle-flat-small_2x.png"\ "feedly-follow-square-flat-green_2x.png"\ "feedly-follow-circle-flat-green_2x.png"\ "feedly-follow-logo-green_2x.png"\ "feedly-follow-square-flat-black_2x.png"\ "feedly-follow-circle-flat-black_2x.png"\ "feedly-follow-logo-black_2x.png"\ "feedly-follow-square-flat-white_2x.png"\ "feedly-follow-circle-flat-white_2x.png"\ "feedly-follow-logo-white_2x.png" | |
for url in $URL | |
do | |
wget $uriLinks$url | |
done |
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 | |
CMDNAME=`basename $0` | |
while getopts v: OPT | |
do | |
case ${OPT} in | |
"v" ) FLR_v="TRUE" | |
NGXVER="${OPTARG}" | |
;; |
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 | |
#################### | |
# # | |
# (C) 2015 kPherox # | |
# # | |
#################### | |
CMDNAME=`basename $0` |
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 | |
################## | |
# # | |
# © 2015 kPherox # | |
# # | |
################## | |
CMDNAME=`basename $0` | |
CAT="cat /dev/urandom" |
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 | |
import sys | |
import os | |
import itertools | |
import pypuzzle | |
from glob import glob | |
puzzle = pypuzzle.Puzzle() |
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 | |
DIR=`pwd` | |
JPEG="-name '*.jpg' -o -name '*.jpeg'" | |
PNG="-name '*.png' -o -name '*.gif'" | |
OPTIJPG="jpegoptim --strip-all --max=80" | |
OPTIPNG="optipng -strip all -o7" | |
find ${DIR} -print0 ${JPEG} | xargs -0 ${OPTIJPG} |
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 | |
class VersionSort { | |
public static function ascendingSort(array &$versionArray) { | |
return usort($versionArray, 'self::ascendingCompare'); | |
} | |
public static function descendingSort(array &$versionArray) { | |
return usort($versionArray, 'self::descendingCompare'); | |
} |
OlderNewer