This file contains hidden or 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 flask import Flask | |
from flask import request | |
from os import environ | |
import json | |
romethods = ['GET', 'HEAD', 'OPTIONS'] | |
rwmethods = ['DELETE', 'POST', 'PUT'] | |
allmethods = romethods + rwmethods | |
app = Flask(__name__) | |
environ['FLASK_DEBUG'] = '1' |
This file contains hidden or 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
# XXX - need to pre-build daa=1 for "set -eu" scripts | |
function remove_dupes() { | |
local dstring="${1}" | |
local dsep="${2}" | |
local -A daa | |
local -a du | |
for dl in $(echo "${dstring}" | tr "${dsep}" "\n") ; do | |
if [ -z "${daa[${dl}]}" ] ; then | |
daa["${dl}"]=1 | |
du+=( "${dl}" ) |
This file contains hidden or 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 | |
echo "max pid is $(cat /proc/sys/kernel/pid_max)" | |
for i in {1..132000} ; do | |
if [ $((${i}%1000)) -eq 0 ] ; then | |
echo "${i} $(realpath /proc/self)" | |
else | |
realpath /proc/self >/dev/null 2>&1 | |
fi | |
done |
This file contains hidden or 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
#ssh stream tcp nowait root /usr/sbin/dropbear dropbear -i -R | |
# set type = UNLISTED to run on an off port | |
service ssh | |
{ | |
socket_type = stream | |
protocol = tcp | |
wait = no | |
port = 22 | |
user = root |
This file contains hidden or 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 | |
# | |
# turn a crosware master.zip into a git checkout with jgit | |
# | |
cd /usr/local | |
curl -kLO https://github.com/ryanwoodsmall/crosware/archive/master.zip | |
unzip -o master.zip | |
mv crosware-master crosware |
This file contains hidden or 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 python3 | |
# | |
# show conversions for a (custom built) netpbm | |
# | |
# ex: ./netpbmto.py | egrep "\['png'.*'xpm'\]" | |
# | |
from os import walk | |
import re |
This file contains hidden or 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 i386/centos:7 | |
#FROM centos:7 | |
RUN \ | |
uname -m | sed 's/^/buildhost: /g' \ | |
&& echo '#!/bin/bash' > /entrypoint.sh \ | |
&& if $(bash -c 'set | grep ^HOSTTYPE= | cut -f2 -d=' | grep -q '86$') ; then \ | |
echo 'this is x86' \ | |
&& echo 'linux32 "${@}"' >> /entrypoint.sh ; \ | |
else \ |
This file contains hidden or 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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <unistd.h> | |
char* findbin(char* s); | |
char* findbin(char* s) | |
{ | |
char* p = getenv("PATH"); |
This file contains hidden or 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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <unistd.h> | |
char *findbin(char *b); | |
int main(int argc, char **argv, char **envp) | |
{ | |
char *s = "dash"; |
This file contains hidden or 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
version: "3" | |
services: | |
jenkins: | |
image: jenkins/jenkins:lts | |
restart: always | |
ports: | |
- "18080:8080" | |
volumes: | |
- jenkins:/var/jenkins_home | |
bitbucket: |