Skip to content

Instantly share code, notes, and snippets.

@PsyDebug
PsyDebug / deployment-mysql.yaml
Last active July 13, 2018 16:23
mysql+PersistentVolume with our data on Kubernetes
apiVersion: v1
kind: Service
metadata:
name: mysql
namespace: mysql
spec:
ports:
- port: 3306
selector:
app: mysql
@PsyDebug
PsyDebug / Dockerfile
Created June 8, 2018 16:56
Dockerfile for rbd k8s controller (centos)
FROM centos
ARG KUBERNETES_VERSION=v1.10.4
ENV CENTOS_FRONTEND=noninteractive \
container=docker \
KUBERNETES_DOWNLOAD_ROOT=https://storage.googleapis.com/kubernetes-release/release/${KUBERNETES_VERSION}/bin/linux/amd64 \
KUBERNETES_COMPONENT=kube-controller-manager
COPY ceph.repo /etc/yum.repos.d/ceph.repo
RUN set -x \
&& yum install -y epel-release \

Keybase proof

I hereby claim:

  • I am PsyDebug on github.
  • I am psydebug (https://keybase.io/psydebug) on keybase.
  • I have a public key whose fingerprint is C0F7 3751 44F2 FA8A EAAA D2F4 3192 E111 0BB8 5AD4

To claim this, I am signing this object:

@PsyDebug
PsyDebug / Main.hs
Created December 8, 2017 15:30
Get suid as date
{-# LANGUAGE OverloadedStrings #-}
import Web.Scotty (scotty, get, ScottyM, ActionM, text)
import Data.Time
import Control.Monad.IO.Class
import Data.Text.Lazy
routes :: ScottyM ()
routes = do
get "/suid" suid
import os
import os.path
from subprocess import Popen
import sys
from flask import Flask,jsonify
app = Flask(__name__)
token = 'HIJVFuigfVuogVOUHGVBpihbHN123'
default_path = '/opt/ansible/playbooks/'
#!/usr/bin/perl -w
use Digest::SHA qw(hmac_sha512_hex);
use HTTP::Request;
use LWP::UserAgent;
my $apikey='';
my $apisecret='';
my $nonce=time();
my $uri='https://bittrex.com/api/v1.1/market/getopenorders?apikey='.$apikey.'&nonce='.$nonce;
my $sign=hmac_sha512_hex($uri,$apisecret);
@PsyDebug
PsyDebug / myserv init
Created April 24, 2017 15:01
typical init
#!/bin/sh
# Source function library.
. /etc/rc.d/init.d/functions
# Source from package defined config. Defaults to,
# bashScriptEnvConfigLocation := Some("/etc/default/" + (packageName in Linux).value)
[ -e /etc/default/myserv ] && . /etc/default/myserv
# Source from sysconfig
@PsyDebug
PsyDebug / reback.py
Created October 11, 2016 15:48
Remove all backups for the given project except the last 5
import sys
import os
import os.path
import argparse
def_folder=os.getcwd()
def createParser ():
parser = argparse.ArgumentParser(description='Delete your backups')
parser.add_argument ('-p', '--proj',default='all',help='Project name')
parser.add_argument ('-l','--list',action='store_true',help='Print all projects')