更新: | 2024-12-08 |
---|---|
作者: | @voluntas |
バージョン: | 2024.2 |
URL: | https://voluntas.github.io/ |
typo などは https://x.com/voluntas までご連絡ください。
更新: | 2024-12-08 |
---|---|
作者: | @voluntas |
バージョン: | 2024.2 |
URL: | https://voluntas.github.io/ |
typo などは https://x.com/voluntas までご連絡ください。
module.exports = function(grunt) { | |
var now = String(Date.now()); | |
var jsResult = "<%= dirs.js %>/target/" + now + ".js"; | |
var cssResult = "<%= dirs.css %>/target/" + now + ".css"; | |
var jsGzipped = jsResult + ".gz"; | |
var cssGzipped = cssResult + ".gz"; | |
var compressFiles = {}; | |
compressFiles[jsGzipped] = jsResult; |
//author: Sun, Junyi (weibo.com/treapdb) | |
//usage: node --nouse-idle-notification --expose-gc --max-old-space-size=8192 memcached.js | |
var config ={ | |
port: 11211, | |
max_memory: 300 // default 100M bytes | |
} | |
var net = require('net'); | |
var LRU = function (max) { // this LRU implementaion is based on https://github.com/chriso/lru |
#!/bin/sh | |
# set IP address with Amazon-VPC ENI(Elastic Network Interface) address and other. | |
# get eth0/1 MAC addresses | |
MACADDR0=`cat /sys/class/net/eth0/address` | |
MACADDR1=`cat /sys/class/net/eth1/address` | |
# get eth0/1 IP addresses on ENI | |
IPADDR0=`/usr/bin/curl -s http://169.254.169.254/latest/meta-data/network/interfaces/macs/${MACADDR0}/local-ipv4s/`; | |
IPADDR1=`/usr/bin/curl -s http://169.254.169.254/latest/meta-data/network/interfaces/macs/${MACADDR1}/local-ipv4s/`; | |
# ifconfig on eth1 (ENI) | |
/sbin/ifconfig eth1 inet ${IPADDR1} netmask 255.255.255.0 2>&1 >> /tmp/seteth1.log |
.DS_Store |