Skip to content

Instantly share code, notes, and snippets.


Jon Bonso | Tutorials Dojo jsbonso

View GitHub Profile
View gist:d1d7d7b9e122ab0d0e5887bef2b499c3
Tutorials Dojo is an active contributor to the official AWS documentation.
We've raised several pull-requests to the official AWS Github repositories that remediate incorrect information in the AWS docs, and not just simple grammar typos.
Here are the latest ones that got approved by the AWS team recently:
jsbonso / gist:f7dbe74c08124c12ab921d2746041a71
Created May 23, 2020
How to avoid your php file from being accessed directly
View gist:f7dbe74c08124c12ab921d2746041a71
// Add this code to automatically
// exit if this php file is accessed directly
defined( 'ABSPATH' ) || exit;
jsbonso /
Created Jan 7, 2020
Generates a new MAC address for your macbook to bypass the Free WIFI limit in Malls/ Cafes
echo "Generating Random MAC Address..."
while [ $COUNTER -lt 100 ]; do
mac=`openssl rand -hex 6 | sed 's/\(..\)/\1:/g; s/.$//'`
#echo "$mac"
if [ ${mac:0:2} = 80 ]
echo "$mac"
View gist:85c65896b4054d69594f27c6ae28897a
"name": "coral-livefyre-api-scraper",
"version": "1.0.0",
"description": " API scraper to fetch data and generate dump file",
"main": "index.js",
"scripts": {
"build": "rimraf dist/ && babel ./ --out-dir dist/ --ignore ./node_modules,./.babelrc,./package.json,./npm-debug.log --copy-files",
"start": "babel-node --presets es2015 index.js"
"keywords": [
jsbonso / gist:fe22ba159acfef6a1dad6fc65129866b
Created May 13, 2019
Transfer data to and from EC2 using SCP
View gist:fe22ba159acfef6a1dad6fc65129866b
Transfer Data TO EC2
scp -i ~/.ssh/<your pem keyname>.pem <data to transfer> ec2-user@<IP Address>:<desired folder>/<data to transfer>
scp -i ~/.ssh/ec2.pem users.json ec2-user@
Transfer Data FROM EC2 (Take note that there is a dot (.) on the end)
scp -i ~/.ssh/ec2.pem ec2-user@ .
jsbonso / gist:c27814a1f7670ca64fd65e5b1a7a0f6e
Created Feb 14, 2019
Curated list of AWS resources to help you pass your AWS Certifications
jsbonso / AWS Certified Solutions Architect-Professional SAP-C01 New Feb 2019 Version Exam Notes.txt
Last active Jul 26, 2021
AWS Certified Solutions Architect-Professional SAP-C01 New Feb 2019 Version Exam Notes
View AWS Certified Solutions Architect-Professional SAP-C01 New Feb 2019 Version Exam Notes.txt
# AWS Certified Solutions Architect-Professional SAP-C01 New Feb 2019 Version Exam
## Final Tips:
1. Don't cram! If you are not ready to take the SAP-C01 exam, then just re-schedule it to a later date. Haste makes waste!
2. Read the question first and then look at the options. Most of the time, you will notice that there are two seemingly similar options which only differs in one or several keywords. This will help you eliminate the wrong options much easier.
3. Take the free AWS Exam Readiness course in and other free courses/videos there.
## Exam Notes:
- The new exam has *75* questions that you have to finish within *3* hours (180 minutes) with a minimum passing score of 750 out of 1000. The official AWS exam page says the exam is 170 minutes, but that is actually incorrect. I took the exam and it is 180 minutes and not 170 minutes.
View gist:29d32c318cdd30a02f5001e086ebf856
Write a method that finds k-th most common element in a list. For example, kthMostCommon(new in[]{5, 4, 3, 2, 1, 5, 4, 3, 2, 5, 4, 3, 5, 4, 5},2) should return 4. In the array, element 1 occurs once, 2 twice, 3 three times, 4 fours times, and 5 five times, making element 5 the most common element in the list and 4th the second most common element,
jsbonso / index.html
Created Jun 6, 2018
Simple Checkout with Price Rules App using Vanilla JavaScript
View index.html
<!DOCTYPE html>
<h1>Simple Checkout with Price Rules</h1>
<div style="padding-bottom: 25px;">
<h3>Test Case 1: 3 CARI Products</h3>
<p>SKUs Scanned: <code>cari, cari, cari, peti </code></p>
<p>Total expected: $249.00</p>
jsbonso /
Created Jun 3, 2018
Linear Search vs Binary Search Example (Based on time processing)
import java.util.Arrays;
public class BinarySearch {
* Implementation of a Binary Search Returns -1 if no match found
* @param sortedArray
* @param target