Skip to content

Instantly share code, notes, and snippets.

View BransonGitomeh's full-sized avatar
🏠
Working from home

_bran BransonGitomeh

🏠
Working from home
View GitHub Profile
CLIENT=respite
ENV=production
@BransonGitomeh
BransonGitomeh / February-3rd.md
Last active February 4, 2020 07:35
Memoirs 2020

What is this

This log explains the steps i took to create teh k8's cluster of this api

  • So i thought of starting the cluster by deploying the ingress, which is where traffic will be coming through. allowing http network traffic

      naturally there was a conflic inside me between caddy and nginx, i have never liked the long configurations for nginx yet the only little part i care about is the proxy configurations. But yet again i havnt used caddy on kubernetes
    
  • I start working on caddy on kubernetes.

  • Can i do it? 😉. lets see.

@BransonGitomeh
BransonGitomeh / cargo.tml
Last active January 27, 2020 12:38
GCD and LCM finding algorithim in RUST
[package]
name = "bran1"
version = "0.1.0"
authors = ["Your Name <[email protected]>"]
edition = "2018"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
rustc-serialize = "0.3.24"
var request = require("request");
// Require `PhoneNumberFormat`.
const PNF = require('google-libphonenumber').PhoneNumberFormat;
// Get an instance of `PhoneNumberUtil`.
const phoneUtil = require('google-libphonenumber').PhoneNumberUtil.getInstance();
function makeid() {
var text = "";
var possible = "abcdefghijklmnopqrstuvwxyz0123456789";
# my huion h1060 pro settings
xsetwacom --set 'HID 256c:006e Pad pad' Button 1 "key +ctrl +z -z -ctrl"
xsetwacom --set 'HID 256c:006e Pad pad' Button 2 "key e"
xsetwacom --set 'HID 256c:006e Pad pad' Button 3 "key b"
xsetwacom --set 'HID 256c:006e Pad pad' Button 8 "key +"
xsetwacom --set 'HID 256c:006e Pad pad' Button 9 "key -"
xsetwacom --set 'HID 256c:006e Pad pad' Button 10 "key ]"
xsetwacom --set 'HID 256c:006e Pad pad' Button 11 "key ["
xsetwacom --set 'HID 256c:006e Pad pad' Button 12 "key p"
@BransonGitomeh
BransonGitomeh / uploader.js
Last active January 19, 2022 10:27
Script to upload apk to playstore, can be added to CI step to automate publications
#!/usr/bin/env NODE_NO_WARNINGS=1 node
const { google } = require('googleapis');
const Promise = require('bluebird');
const fs = require('fs');
const settings = require('./config/settings.json');
const { version } = require('./package.json');
// Enable API access into the Developer Console: https://play.google.com/apps/publish/?account=7639196906174529268#ApiAccessPlace
@BransonGitomeh
BransonGitomeh / setup.yaml
Created October 14, 2018 11:13
Simple Ingress Setup with sample pods
apiVersion: v1
kind: Service
metadata:
name: default-http-backend
spec:
ports:
- port: 80
targetPort: 8080
selector:
app: default-http-backend
import "babel-polyfill"
import { execute, makePromise } from 'apollo-link';
import { HttpLink } from 'apollo-link-http';
import gql from 'graphql-tag';
import { WebSocketLink } from 'apollo-link-ws';
import { split } from 'apollo-link';
import { getMainDefinition } from 'apollo-utilities';
const uri = 'http://localhost:4040/graphql';
@BransonGitomeh
BransonGitomeh / install-latest-compose.sh
Created July 23, 2018 14:49 — forked from deviantony/install-latest-compose.sh
Install latest version of Docker Compose
#!/bin/bash
# get latest docker compose released tag
COMPOSE_VERSION=$(curl -s https://api.github.com/repos/docker/compose/releases/latest | grep 'tag_name' | cut -d\" -f4)
# Install docker-compose
sh -c "curl -L https://github.com/docker/compose/releases/download/${COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose"
chmod +x /usr/local/bin/docker-compose
sh -c "curl -L https://raw.githubusercontent.com/docker/compose/${COMPOSE_VERSION}/contrib/completion/bash/docker-compose > /etc/bash_completion.d/docker-compose"
site.com {
proxy / 144.202.108.184:8080 {
websocket
header_upstream Host {host}
header_upstream X-Real-IP {remote}
header_upstream X-Forwarded-Proto {scheme}
}
}