Look at LSB init scripts for more information.
Copy to /etc/init.d:
# replace "$YOUR_SERVICE_NAME" with your service's name (whenever it's not enough obvious)| const iconv = require('iconv-lite'); | |
| const assert = require('assert'); | |
| const urlencode = input => input.replace(/[^A-Za-z0-9-_.!~*'()]/g, c => c==' ' ? '+' : [...iconv.encode(c, "EUC-KR")].map(b => '%'+b.toString(16).toUpperCase()).join('')); | |
| assert(urlencode('2013_16_방파제축조공사 추가절차 공사비 청구.pdf')=='2013_16_%B9%E6%C6%C4%C1%A6%C3%E0%C1%B6%B0%F8%BB%E7+%C3%DF%B0%A1%C0%FD%C2%F7+%B0%F8%BB%E7%BA%F1+%C3%BB%B1%B8.pdf') |
Look at LSB init scripts for more information.
Copy to /etc/init.d:
# replace "$YOUR_SERVICE_NAME" with your service's name (whenever it's not enough obvious)| import sys | |
| from gevent import server | |
| from gevent.server import _tcp_listener | |
| from gevent.monkey import patch_all; patch_all() | |
| from multiprocessing import Process, current_process, cpu_count | |
| def note(format, *args): | |
| sys.stderr.write('[%s]\t%s\n' % (current_process().name, format%args)) |
| // | |
| // SVD.swift | |
| // | |
| // Created by Dongwan Kim on 2015. 10. 30.. | |
| // | |
| /* MATLAB svd(X) | |
| For the matrix |
| CGSize CGSizeAspectFit(CGSize aspectRatio, CGSize boundingSize) | |
| { | |
| float mW = boundingSize.width / aspectRatio.width; | |
| float mH = boundingSize.height / aspectRatio.height; | |
| if( mH < mW ) | |
| boundingSize.width = boundingSize.height / aspectRatio.height * aspectRatio.width; | |
| else if( mW < mH ) | |
| boundingSize.height = boundingSize.width / aspectRatio.width * aspectRatio.height; | |
| return boundingSize; | |
| } |
| /* | |
| File: CFNetwork/CFNetworkErrors.h | |
| Contains: CFNetwork error header | |
| Copyright: Copyright (c) 2006-2013 Apple Inc. All rights reserved. | |
| Bugs?: For bug reports, consult the following page on | |
| the World Wide Web: | |
| #!/bin/bash | |
| for f in $(ls *@2x.png) | |
| do | |
| filename=$(basename $f | sed 's/@2x././g') | |
| echo $filename | |
| H=$(sips -g pixelHeight "$f" | grep 'pixelHeight' | cut -d: -f2) | |
| W=$(sips -g pixelWidth "$f" | grep 'pixelWidth' | cut -d: -f2) | |
| H50=$(($H / 2)) |