Skip to content

Instantly share code, notes, and snippets.

Avatar

jimmycliff obonyo obonyojimmy

  • Kenya
View GitHub Profile
View jq-cheetsheet.md

Processing JSON using jq

jq is useful to slice, filter, map and transform structured json data.

Installing jq

On Mac OS

brew install jq

View notebook_instance.sh
# A1. Launch a notebook instance and get URL to Jupyter running on it
IMAGE=--image-family=tf-latest-cpu
INSTANCE_NAME=dlvm
GCP_LOGIN_NAME=google-cloud-customer@gmail.com # CHANGE THIS
STARTUP_SCRIPT="git clone https://github.com/GoogleCloudPlatform/data-science-on-gcp"
echo "Launching $INSTANCE_NAME"
gcloud compute instances create ${INSTANCE_NAME} \
--machine-type=n1-standard-2 \
--scopes=https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/userinfo.email \
@obonyojimmy
obonyojimmy / info.plist
Created Sep 16, 2020 — forked from dabit3/info.plist
Example React Native Xcode info.plist with redirect
View info.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleDisplayName</key>
<string>RNAuth</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
@obonyojimmy
obonyojimmy / spot_price.config
Created Aug 29, 2020 — forked from rahulmamgain/spot_price.config
Spot Instance Configuration Elastic Beanstalk
View spot_price.config
Resources:
AWSEBAutoScalingLaunchConfiguration:
Type: "AWS::AutoScaling::LaunchConfiguration"
Properties:
SpotPrice:
"Fn::GetOptionSetting":
Namespace: "aws:elasticbeanstalk:application:environment"
OptionName: "EC2_SPOT_PRICE"
DefaultValue: {"Ref":"AWS::NoValue"}
View Install ffmpeg on AWS Linux AMI
#
sudo su -
cd /usr/local/bin
mkdir ffmpeg
cd ffmpeg
wget https://www.johnvansickle.com/ffmpeg/old-releases/ffmpeg-4.2.1-amd64-static.tar.xz
tar xvf ffmpeg-4.2.1-amd64-static.tar.xz
@obonyojimmy
obonyojimmy / curl.md
Created Jul 20, 2020 — forked from subfuzion/curl.md
curl POST examples
View curl.md

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

@obonyojimmy
obonyojimmy / assetPath.js
Last active Jun 20, 2020 — forked from Loupax/assetPath.js
A Meteor function that returns the path of the provided package asset
View assetPath.js
var getAssetPath = function getAssetPath(packageName, assetPath) {
assetPath = assetPath || '';
var meteor_root = Npm.require('fs').realpathSync(process.cwd() + '/../');
var assets_folder = meteor_root + '/server/assets/packages/'+packageName.replace(':','_')+'/'+assetPath;
return assets_folder;
};
@obonyojimmy
obonyojimmy / 00-https-single-instance.yaml
Created May 14, 2020 — forked from the-vampiire/00-https-single-instance.yaml
AWS EB elastic beanstalk single instance nodejs nginx SSL/HTTPS ebextensions config file
View 00-https-single-instance.yaml
# REQUIREMENTS
# set the following configuration environment variables at: configuration -> software -> modify -> environment variables
# CERT_EMAIL: the email address used for registering the cert
# CERT_DOMAIN: the domain to create a cert for
# EB environment URL (listed at the top of the environment page) or a custom domain, custom domains must have a DNS CNAME record pointing to the EB environment URL
# !! MUST NOT have "http://" prefix or the trailing "/" at the end !!
# EXAMPLES
View Dockerfile
FROM node:12.16.1
# Install Meteor
ENV METEOR_ALLOW_SUPERUSER true
RUN curl https://install.meteor.com/ | sh
WORKDIR /home
ADD entrypoint.sh .
You can’t perform that action at this time.