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 | |
HOSTNAME="localhost" | |
PORT=${PORT-4000} | |
NODE="app_$PORT" | |
if [ -z "$COOKIE" ] | |
then | |
COOKIE=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1) | |
fi |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
[Unit] | |
Description=Copy CIFS mount | |
After=network.target | |
[Service] | |
Type=oneshot | |
RemainAfterExit=yes | |
TimeoutStartSec=0 | |
ExecStart=/bin/sh -c "rm -fr /opt/sbin && rsync -a /usr/sbin/ /opt/sbin/ && /usr/bin/docker run -v /opt/sbin:/target so0k/mount.cifs_copy /target && mount --bind /opt/sbin/ /usr/sbin/" |
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
apiVersion: batch/v1 | |
kind: Job | |
metadata: | |
name: pi-with-timeout | |
spec: | |
parallelism: 20 | |
completions: 100 | |
template: | |
metadata: | |
name: pi |
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
# Phoenix Framework - A productive web framework that does not compromise speed and maintainability | |
[Unit] | |
Description=Phoenix Framework ISControl Application | |
After=network.target | |
[Service] | |
Type=simple | |
User=deployer | |
RemainAfterExit=yes |
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 os | |
import fcntl | |
from gevent.core import wait_read, wait_write | |
class GeventFD(object): | |
""" Wrap a file descriptor so it can be used for non-blocking reads and writes with gevent. | |
>>> stdin = GeventFD(sys.stdin.fileno()) | |
>>> stdin.read(5) | |
'hello' |