View getnodejs.sh
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 | |
getversion() { | |
curl https://nodejs.org/en/ -o index.html | |
export version=$(cat index.html | grep Current | tail -n 1 | awk -F' v' '{ print $2 }' | awk -F' Current' '{ print $1 }') | |
} | |
cleandownload() { | |
rm index.html | |
rm node.tar.xz |
View Dockerfile
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
FROM centos:6 | |
RUN yum -y update && \ | |
yum -y install curl gcc gcc-c++ libaio-devel git && \ | |
yum clean all && \ | |
rm -r -f /var/cache/yum/* | |
COPY getgo.sh /opt/ | |
RUN cd /opt && chmod +x ./getgo.sh && ./getgo.sh && mkdir /usr/local/go | |
RUN groupadd -g 1000 somebody && useradd -m -u 1000 -g 1000 somebody && chown -R somebody:somebody /usr/local/go | |
ENV GOROOT=/opt/go | |
ENV GOPATH=/usr/local/go |
View generate.sh
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
go build -ldflags "-X main.Version=`git describe --tags --long`" test.go | |
./test | |
# 4.16.5-DEV-0-g9a95002 |
View json_generate_demo.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View client.py
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
""" | |
client.py - AsyncIO Server using StreamReader and StreamWriter | |
This will create 200 client connections to a server running server.py | |
It will handshake and run similar to this: | |
Server: HELLO | |
Client: WORLD |
View luksloopback.sh
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 | |
loopdevice=/dev/loop0 | |
loopfile=crypt.loop | |
#megabytes | |
loopsize=256 | |
#/dev/mapper/xxxxx when open | |
cryptmapper=myCrypt |
View wallpaper-change-gnome3.py
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 random | |
import time | |
import subprocess | |
random.seed() | |
full_files = [] | |
rootdir = "/home/dbehnke/wallpapers" | |
sleeptime = 300 | |
while 1: | |
print("reading pictures from ", rootdir) |
View envoracle.sh
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 | |
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | |
export ORACLE_HOME=${DIR} | |
export LD_LIBRARY_PATH=${DIR}:$LD_LIBRARY_PATH |
View ubuntu1404-customize.sh
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 | |
function addppa { | |
add-apt-repository $1 -y | |
} | |
function aptinstall { | |
apt-get install $1 -y | |
} |
View docker-ol7-mkimage.sh
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
#!/usr/bin/env bash | |
# | |
# Create a base CentOS Docker image. | |
# | |
# This script is useful on systems with yum installed (e.g., building | |
# a CentOS image on CentOS). See contrib/mkimage-rinse.sh for a way | |
# to build CentOS images on other systems. | |
usage() { | |
cat <<EOOPTS |
NewerOlder