Skip to content

Instantly share code, notes, and snippets.


Obeng William obengwilliam

View GitHub Profile
obengwilliam / antd_sc_example.js
Created May 5, 2020 — forked from newswim/antd_sc_example.js
Wrapping Ant Design components with Styled Components
View antd_sc_example.js
import { Link } from 'react-router-dom'
import { Badge, Col, Menu } from 'antd'
const StyledBadge = styled(Badge)`
.ant-badge-count {
background-color: #7ECBBF;
color: white;
box-shadow: 0 0 0 1px #d9d9d9 inset;
obengwilliam / mongoose connection
Created Apr 26, 2020
quickly connect to mongodb using mongoose #mongoose #mongodb
View mongoose connection
'use strict';
const mongoose = require('mongoose');
run().catch(err => console.log(err));
async function run() {
mongoose.set('useUnifiedTopology', true);
mongoose.set('useNewUrlParser', true);
obengwilliam / bundle.js
Created Apr 19, 2020 — forked from jackgill/bundle.js
A node.js script to create a bundle containing an npm package, and all of its dependencies.
View bundle.js
* This script will download a package (and all of its dependencies) from the
* online NPM registry, then create a gzip'd tarball containing that package
* and all of its dependencies. This archive can then be copied to a machine
* without internet access and installed using npm.
* The idea is pretty simple:
* - npm install [package]
* - rewrite [package]/package.json to copy dependencies to bundleDependencies
* - npm pack [package]
obengwilliam /
Created Apr 9, 2020 — forked from tterb/
A collection of README badges



MIT License GPLv3 License AGPL License


Version GitHub Release

obengwilliam /
Last active Feb 29, 2020 — forked from so0k/
Playing with kubectl output

Kubectl output options

Let's look at some basic kubectl output options.

Our intention is to list nodes (with their AWS InstanceId) and Pods (sorted by node).

We can start with:

kubectl get no
View Activate Office 2019 for macOS

Activate MS Office 2019/2016 for macOS - Microsoft_Office_2019_VL_Serializer

Office 2019 above


Note that Office2019 DO NOT support activate via simple copy/paste plist license file which is the simplest way to activate Office 2016. Fortunately, you can also use the VL Serializer tool, just install Office 2019 and Serializer, then run Serializer to activate.



Check logs for healthchecks in a dockerfile

docker inspect --format "{{json .State.Health }}" <container name> | jq
obengwilliam / raddit.service
Last active Sep 25, 2019 — forked from Artemmkin/raddit.service
Raddit unit file
View raddit.service
Description=Raddit application
ExecStart=/bin/bash -lc 'puma'
View populateproductsimage.js
const R = require('ramda')
const assert = require('assert')
const body = '<h1>body</>'
const subject = '<h1> subject</h1>'
// function populateDefaults (profile) {
// const cloneProfile = R.clone(profile)
// if (!cloneProfile.template || !cloneProfile.template.products) {
// console.log('No template or no products')
obengwilliam /
Last active Jul 3, 2019 — forked from omidraha/
Authentication and Authorization Concepts for MicroServices

auth with microservices

Authorization and Authentication are hard. when you only have to implement them once (as you do within a monolith) instead of over and over again, it makes the developer happy :-), and maybe leads to less implementation failures.

When you have a bunch of microservices, this is something that has to be considered.

Implement it once or in every microservice, or something in between?

You can’t perform that action at this time.