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
import java.util.Arrays; | |
/** | |
* Created by IntelliJ IDEA. | |
* User: mifang | |
* Date: 12/21/11 | |
* Time: 2:48 PM | |
* To change this template use File | Settings | File Templates. | |
*/ | |
public class ArrayCopyTest { |
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
import org.mozilla.javascript.Context; | |
import org.mozilla.javascript.Function; | |
import org.mozilla.javascript.NativeObject; | |
import org.mozilla.javascript.Scriptable; | |
import org.mozilla.javascript.commonjs.module.Require; | |
import org.mozilla.javascript.commonjs.module.RequireBuilder; | |
import org.mozilla.javascript.commonjs.module.provider.SoftCachingModuleScriptProvider; | |
import org.mozilla.javascript.commonjs.module.provider.UrlModuleSourceProvider; | |
import java.io.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
#remove all exited containers | |
docker rm $(docker ps -aq) | |
#remove untagged images | |
docker rmi $(docker images -f "dangling=true" -q) | |
#both | |
alias dockerclean='docker rm -v $(docker ps -aq) || true && docker rmi $(docker images -f "dangling=true" -q) || true' | |
#remove weeks old |
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
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9 && echo 'deb https://get.docker.io/ubuntu docker main' > /etc/apt/sources.list.d/docker.list && apt-get update && apt-get install -y lxc-docker |
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
git fetch --all && git reset --hard origin/master |
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
du -Pshx /* 2>/dev/null |
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
db.runCommand({"convertToCapped": "log", size: 1000000000}); |
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
netstat -tan | awk '{print $6}' | sort | uniq -c |
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
until /usr/bin/curl http://127.0.0.1:8080; do echo "waiting for API server to come online..."; sleep 3; 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
alias fig="docker run -v /var/run/docker.sock:/run/docker.sock -v \$PWD:/docker -w /docker --rm -it fig fig" |
OlderNewer