Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Adedapo Ajuwon dapseen

🏠
Working from home
View GitHub Profile
@dapseen
dapseen / kubernetes.sh
Created Jul 13, 2020
kubernetes single file CI/CD
View kubernetes.sh
apk add gettext #install gettext
echo $KUBE_TOKEN | base64 -d > ./kube_token
echo $KUBE_CA | base64 -d > ./kube_ca
kubectl config set-cluster $CLUSTER_NAME --server=$SERVER_URL --certificate-authority="$(pwd)/kube_ca"
kubectl config set-credentials $K8S_SA --token="$(cat ./kube_token)"
kubectl config set-context $K8S_SA --namespace=$NAMESPACE --cluster=$CLUSTER_NAME --user=$K8S_SA
kubectl config use-context $K8S_SA
#deploy image to AWS ECR
docker build -t ${BITBUCKET_REPO_OWNER}/${REPO_NAME} .
@dapseen
dapseen / fluentd.yaml
Created Apr 8, 2020
AWS fluentD, reduce logs to namespace
View fluentd.yaml
apiVersion: v1
kind: ServiceAccount
metadata:
name: fluentd
namespace: amazon-cloudwatch
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: fluentd-role
View sidecar.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: mpos
labels:
apps: mpos
spec:
replicas: 1
selector:
matchLabels:
@dapseen
dapseen / xargs.sh
Created Nov 16, 2019
using find with xargs
View xargs.sh
find . -name "*.png" | xargs rm
#https://shapeshed.com/unix-xargs/
@dapseen
dapseen / .bashrc
Created Apr 17, 2019
setup time for tellvictor project
View .bashrc
alias tell_proj="cd /var/www/html/tellvictor"
View home.blade.php
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.0/jquery.min.js"></script>
@dapseen
dapseen / rewrite_result.css
Last active Nov 16, 2017
drupal 7 slick export
View rewrite_result.css
#date-created span{
position:absolute;
top:160px;
font-size: .75em;
width: 76%;
padding: 2em 1.5em 1em;
background-image: linear-gradient(to bottom,rgba(255,255,255,0),rgba(0,0,0,.75));
color: #fff;
font-style: italic;
font-weight: 300;
@dapseen
dapseen / account_id.install
Created Sep 25, 2017
generating unique account ID -- Drupal 7
View account_id.install
<?php
/**
* implements hook_schema()
*/
function cribs_schema()
{
$schema['cribs'] = array(
'description' => 'table holding account id of users',
You can’t perform that action at this time.