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
@obonyojimmy
obonyojimmy / count_children.sh
Created Dec 2, 2018 — forked from radu-gheorghe/count_children.sh
Query parents and count children
View count_children.sh
#cleanup first
curl -XDELETE localhost:9200/test/
echo
#create index
curl -XPUT localhost:9200/test
echo
#create parent type
curl -XPUT localhost:9200/test/test_parent
@obonyojimmy
obonyojimmy / setup-mongodb.sh
Created Nov 20, 2018 — forked from moshest/setup-mongodb.sh
Setup Mongodb Server on Amazon EC2
View setup-mongodb.sh
#!/usr/bin/env bash
# usage: wget -N https://gist.githubusercontent.com/moshest/e4c73efc8d6a35971f6e/raw/setup-mongodb.sh && sh ./setup-mongodb.sh
set -e
# configs
read -e -p "Replica set name: " -i "rep1" replSet
read -e -p "Hostname: " -i $(curl -s http://169.254.169.254/latest/meta-data/public-hostname) hostname
read -e -p "Swap size: " -i "8G" swapsize
@obonyojimmy
obonyojimmy / aws_mongo.sh
Created Nov 20, 2018 — forked from wizact/aws_mongo.sh
Preparing and running an aws instance for Mongo
View aws_mongo.sh
#!/bin/bash
set -e
install_mongo() {
sudo yum -y update
echo "[MongoDB]
name=MongoDB Repository
baseurl=http://downloads-distro.mongodb.org/repo/redhat/os/x86_64
gpgcheck=0
@obonyojimmy
obonyojimmy / mongoUrlExample.md
Created Nov 8, 2018 — forked from cfnelson/mongoUrlExample.md
example of MONGO_URL & MONGO_OPLOG_URL
View mongoUrlExample.md
{
  "galaxy.meteor.com": {
    "env": {
      "ENV": "staging",
      "MONGO_URL": "mongodb://okgrow-staging-meteor:fakePassword1234@okgrow-staging-shard-00-00-fxnj9.mongodb.net:27017,okgrow-staging-shard-00-01-fxnj9.mongodb.net:27017,okgrow-staging-shard-00-02-fxnj9.mongodb.net:27017/admin?ssl=true&replicaSet=okgrow-staging-shard-0",
      "MONGO_OPLOG_URL": "mongodb://okgrow-staging-oplog:fakePassword5678@okgrow-staging-shard-00-00-fxnj9.mongodb.net:27017,okgrow-staging-shard-00-01-fxnj9.mongodb.net:27017,okgrow-staging-shard-00-02-fxnj9.mongodb.net:27017/local?authSource=admin&ssl=true&replicaSet=okgrow-staging-shard-0",
    }
  }
}
@obonyojimmy
obonyojimmy / yarm.config
Created Oct 30, 2018 — forked from gssbzn/yarm.config
Elastic Beanstalk Rails+Webpacker extension
View yarm.config
# Copyright 2018 SwiftComply.com
commands:
01_node_install:
test: "[ `node --version` != 'v8.10.0' ]"
command: "curl --silent --location https://rpm.nodesource.com/setup_8.x | sudo bash -"
02_yarn_repo:
test: "[ ! -f /etc/yum.repos.d/yarn.repo ]"
command: "curl --silent --location https://dl.yarnpkg.com/rpm/yarn.repo | sudo tee /etc/yum.repos.d/yarn.repo"
03_yarn_install:
test: "[ ! -x /usr/bin/yarn ]"
@obonyojimmy
obonyojimmy / paginate.php
Created Aug 17, 2018 — forked from vluzrmos/paginate.php
Laravel Paginate Collection or Array
View paginate.php
<?php
/**
* Gera a paginação dos itens de um array ou collection.
*
* @param array|Collection $items
* @param int $perPage
* @param int $page
* @param array $options
*
* @return LengthAwarePaginator
@obonyojimmy
obonyojimmy / .md
Created Jul 5, 2018 — forked from SeriousM/.md
Logout all users from meteor application
View .md
@obonyojimmy
obonyojimmy / cloudSettings
Created Jun 20, 2018 — forked from aurawindsurfing/cloudSettings
Visual Studio Code Settings Sync Gist
View cloudSettings
{"lastUpload":"2018-05-03T11:33:27.621Z","extensionVersion":"v2.9.2"}
@obonyojimmy
obonyojimmy / lock-switch-to-signup.html
Created Jun 14, 2018 — forked from sandrinodimattia/lock-switch-to-signup.html
Auth0 Lock example that shows how to switch to the Login page when a certain condition is met
View lock-switch-to-signup.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Sign In with Auth0</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<style>
html, body { padding: 0; margin: 0; }
You can’t perform that action at this time.