Skip to content

Instantly share code, notes, and snippets.

jimmycliff obonyo obonyojimmy

  • Kenya
Block or report user

Report or block obonyojimmy

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
robzhu / client.js
Created Jan 4, 2019
WebSocket client.js
View client.js
const WebSocket = require('ws');
const readline = require('readline');
const url = process.argv[2];
const ws = new WebSocket(url);
ws.on('open', () => console.log('connected'));
ws.on('message', data => console.log(`From server: ${data}`));
ws.on('close', () => {
obonyojimmy /
Created Nov 20, 2018 — forked from wizact/
Preparing and running an aws instance for Mongo
set -e
install_mongo() {
sudo yum -y update
echo "[MongoDB]
name=MongoDB Repository
aurawindsurfing / cloudSettings
Last active Feb 20, 2020
Visual Studio Code Settings Sync Gist
View cloudSettings
View 16.3-blogpost-signatures.js
class Example extends React.Component<
> {
static getDerivedStateFromProps(
nextProps: Props,
prevState: State
): $Shape<State> | null {
// ...
gssbzn / yarm.config
Last active Oct 30, 2018
Elastic Beanstalk Rails+Webpacker extension
View yarm.config
# Copyright 2018
test: "[ `node --version` != 'v8.10.0' ]"
command: "curl --silent --location | sudo bash -"
test: "[ ! -f /etc/yum.repos.d/yarn.repo ]"
command: "curl --silent --location | sudo tee /etc/yum.repos.d/yarn.repo"
test: "[ ! -x /usr/bin/yarn ]"
obonyojimmy / recursive-render.html
Created Mar 15, 2018 — forked from nkvenom/recursive-render.html
React Example Render Recursive Function
View recursive-render.html
<!DOCTYPE html>
<html lang="en">
<meta charset="UTF-8">
<title>Recursive Rendering in React</title>
<script src=""></script>
<script src=""></script>
<script src=""></script>
apolloclark /
Last active Mar 2, 2020
Bash one-liner to find public facing AWS S3 buckets, and make them private


aws s3api list-buckets --query 'Buckets[*].[Name]' --output text | xargs -I {} bash -c 'if [[ $(aws s3api get-bucket-acl --bucket {} --query '"'"'Grants[?Grantee.URI==`` && Permission==`READ`]'"'"' --output text) ]]; then aws s3api put-bucket-acl --acl "private" --bucket {} ; fi'

1. List all of the user's buckets, and output the name, as text.

a-h / index.js
Last active Mar 25, 2020
JSON logging in winston with a timestamp
View index.js
const winston = require('winston');
const MESSAGE = Symbol.for('message');
const jsonFormatter = (logEntry) => {
const base = { timestamp: new Date() };
const json = Object.assign(base, logEntry)
logEntry[MESSAGE] = JSON.stringify(json);
return logEntry;
View initial-sync-data.js
function fullSync(page = 1) {
let open ="books", 1);
// Set up the database schema
open.onsuccess = evt => {
let db = open.result;
fullSyncPage(db, 1);
nnnikolay / fix-npm.config
Last active May 13, 2019
Not the final AWS Elastic Beanstalk deployment for NodeJS. Why not the final? some parts are missing or not tested, like configuration changes. Currently it has been tested for application deployment only.
View fix-npm.config
mode: "000775"
owner: root
group: users
content: |
# enable extra logs
set -xe
# Defines variables for use by the other scripts below.
You can’t perform that action at this time.