Skip to content

Instantly share code, notes, and snippets.

View aburan28's full-sized avatar

Adam Buran aburan28

  • San Francisco Bay Area
View GitHub Profile
package main
import (
"fmt"
"github.com/fxtlabs/primes"
)
func Generate(ch chan<- int) {
for i := 20000; ; i++ {
res = []
def inorder(root):
if not root:
return
inorder(root.left)
res.append(root.val)
inorder(root.right)
def preorder(root):
<!--
~ Artifactory is a binaries repository manager.
~ Copyright (C) 2018 JFrog Ltd.
~
~ Artifactory is free software: you can redistribute it and/or modify
~ it under the terms of the GNU Affero General Public License as published by
~ the Free Software Foundation, either version 3 of the License, or
~ (at your option) any later version.
~
~ Artifactory is distributed in the hope that it will be useful,
#!/bin/bash
xinput list | grep -Po 'id=\K\d+(?=.*slave\s*keyboard)' | xargs -P0 -n1 xinput test
@aburan28
aburan28 / setup-cicd-kube.bash
Created January 21, 2019 04:47
Kubernetes CI/CD examples
kubectl set image deployment <> <container>=<image>
kubectl rollout history deployment <deployment>
kubectl rollout undo deploy/<deployment>
#!/bin/bash
set -euxo pipefail
sudo apt-get update && sudo apt-get install -y apt-transport-https
curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add -
echo "deb http://apt.kubernetes.io/ kubernetes-xenial main" | sudo tee -a /etc/apt/sources.list.d/kubernetes.list
sudo apt-get update
sudo apt-get install -y kubectl
exit 0
ssl-default-bind-options no-sslv3
ssl-default-bind-ciphers ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:RSA+AESGCM:RSA+AES:!aNULL:!MD5:!DSS
ssl-default-server-options no-sslv3
global
pidfile /var/run/haproxy.pid
tune.ssl.default-dh-param 2048
log 127.0.0.1:1514 local0
# disable sslv3, prefer modern ciphers
allow 127.0.0.0/8;
allow 10.0.0.0/8;
allow 192.168.0.0/16;
allow 172.16.0.0/12;
deny all;
version: '2'
services:
aqua-csp-service:
image: aquasec/csp:3.0
hostname: aqua-csp
environment:
BATCH_INSTALL_ENFORCE_MODE: n
BATCH_INSTALL_GATEWAY: csp
BATCH_INSTALL_NAME: default
BATCH_INSTALL_TOKEN: aqua-csp
- name: Add docker apt repo
apt_repository:
repo: 'deb https://apt.dockerproject.org/repo ubuntu-{{ ansible_distribution_release }} main'
state: present
register: result
- name: Import the Docker repository key
when: result|success
apt_key:
url: https://apt.dockerproject.org/gpg