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 MySQLdb | |
import os | |
import time | |
print("environment dump") | |
print("----------------") | |
for k,v in os.environ.items(): | |
print(k, "=", v) | |
print("----------------") |
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: image.openshift.io/v1 | |
kind: ImageStream | |
metadata: | |
name: openjdk18 | |
spec: | |
lookupPolicy: | |
local: false | |
tags: | |
- annotations: | |
tags: builder |
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
package main | |
import ( | |
"context" | |
"crypto/tls" | |
"fmt" | |
"io/ioutil" | |
"net/http" | |
"net/url" |
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 categorizer import Categorizer | |
desc = "Amazon web services" | |
amount = 99 | |
categorizer = Categorizer("config.yaml") | |
account_expense = categorizer.getAccount(desc, amount) | |
print(account_expense) |
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: apps.openshift.io/v1 | |
kind: DeploymentConfig | |
metadata: | |
name: pod-with-supervisord | |
labels: | |
app: myapp | |
spec: | |
replicas: 1 | |
template: | |
metadata: |
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
diff --git a/cmd/push.go b/cmd/push.go | |
index 636dc8c..07b031d 100644 | |
--- a/cmd/push.go | |
+++ b/cmd/push.go | |
@@ -4,6 +4,7 @@ import ( | |
"fmt" | |
"net/url" | |
"os" | |
+ "path/filepath" | |
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 | |
ENV SUPERVISORD_DIR /opt/supervisord | |
RUN mkdir -p ${SUPERVISORD_DIR}/conf ${SUPERVISORD_DIR}/bin | |
ADD supervisor.conf ${SUPERVISORD_DIR}/conf/ | |
ADD https://github.com/ochinchina/supervisord/releases/download/v0.5/supervisord_0.5_linux_amd64 ${SUPERVISORD_DIR}/bin/supervisord | |
RUN chgrp -R 0 ${SUPERVISORD_DIR} && \ |
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
mkfs.vfat -n BOOT /dev/sda1 | |
mkfs.btrfs -L root /dev/sda2 | |
mount -t btrfs /dev/sda2 /mnt/ | |
btrfs subvolume create /mnt/nixos | |
umount /mnt/ | |
mount -t btrfs -o subvol=nixos /dev/sda2 /mnt/ | |
btrfs subvolume create /mnt/var | |
btrfs subvolume create /mnt/home | |
btrfs subvolume create /mnt/tmp |
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
package occlient | |
import ( | |
"fmt" | |
"io/ioutil" | |
"os" | |
"reflect" | |
"testing" | |
routev1 "github.com/openshift/api/route/v1" |
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
package main | |
import ( | |
"fmt" | |
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" | |
corev1client "k8s.io/client-go/kubernetes/typed/core/v1" | |
"k8s.io/client-go/tools/clientcmd" | |
) |