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
// tree to find the short tag name for each | |
// of a list of tag names | |
// ['a','a','b','button','button'] => ['a1','a2','b','bu1','bu2'] | |
function StringNode(str, parent) { | |
this.string = str || ''; | |
this.parent = parent; | |
this.children = {}; | |
this.childCount = 0; | |
this.pointerCount = 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
# /etc/sysconfig/docker | |
# | |
# Other arguments to pass to the docker daemon process | |
# These will be parsed by the sysv initscript and appended | |
# to the arguments list passed to docker -d | |
other_args="--bridge=docker0" | |
DOCKER_CERT_PATH=/etc/docker | |
# Resolves: rhbz#1176302 (docker issue #407) |
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
upstream docker-mirror-upstream { | |
server upstream.example.com; | |
} | |
proxy_cache_path /var/lib/docker-mirror/cache levels=1:2 max_size=10g inactive=48h keys_zone=cache:10m; | |
server { | |
listen 80 default_server; | |
listen 443 ssl default_server; |
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 | |
# The compiler toolchain is specified by `xcode-select`. You can use | |
# `/Library/Developer/CommandLineTools` selected as the Developer | |
# directory. That should make the build independent of Xcode.app. | |
# | |
# eg: sudo xcode-select -s /Library/Developer/CommandLineTools | |
# | |
# If you are on 10.14+, make sure your CLI tools are installed: | |
# |
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 [[ $# -eq 0 || $1 == '-h' || $1 == '--help' ]]; then | |
echo >&2 "Usage: $0 <dirs>" | |
echo >&2 "Use the IGNORE_REMOTES environment variable to ignore" | |
echo >&2 "remotes whose hosts match the ignore value." | |
exit 1 | |
fi | |
res=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
(psudo=/etc/pam.d/sudo; | |
if test -e "$psudo" \ | |
&& ! grep --silent pam_tid.so "$psudo" \ | |
&& test -t 0; then | |
false | |
fi) || function sudo() { | |
set -e | |
sudo_=$(which sudo) | |
if ! test -t 0; then | |
# no tty, just pass the sudo call through |