Skip to content

Instantly share code, notes, and snippets.

View Tunji545's full-sized avatar

Olatunji Omisakin Tunji545

View GitHub Profile
@Tunji545
Tunji545 / Sync gh-pages + master branches
Created January 29, 2021 09:24 — forked from mandiwise/Sync gh-pages + master branches
Keep gh-pages up to date with a master branch
// Reference: http://lea.verou.me/2011/10/easily-keep-gh-pages-in-sync-with-master/
$ git add .
$ git status // to see what changes are going to be commited
$ git commit -m 'Some descriptive commit message'
$ git push origin master
$ git checkout gh-pages // go to the gh-pages branch
$ git rebase master // bring gh-pages up to date with master
$ git push origin gh-pages // commit the changes
@Tunji545
Tunji545 / bouncing-circles-es6-classes.js
Created January 20, 2021 07:18 — forked from aerrity/bouncing-circles-es6-classes.js
P5.js example demonstrating ES6 classes, inheritance and method chaining
// ----------------------------
// Parent class (or superclass)
// ----------------------------
class Circle {
constructor(x = 50, y = 50, r = 100, col = '#f00') {
this.x = x;
this.y = y;
this.r = r;
this.col = col;
this.vx = random(-5,5);
@Tunji545
Tunji545 / client.js
Created January 20, 2021 06:53 — forked from aerrity/client.js
P5.js, Node, Express & MongoDB: Circle update demo
let myCircle;
function setup() {
createCanvas(400, 400);
background(0);
// retrieve the x, y coords from the DB
fetch('/circle', {method: 'GET'})
.then(function(response) {
if(response.ok) return response.json();
throw new Error('Request failed.');
@Tunji545
Tunji545 / client.js
Created January 20, 2021 06:50 — forked from aerrity/client.js
Node, Express & MongoDB: Button click example
console.log('Client-side code running');
const button = document.getElementById('myButton');
button.addEventListener('click', function(e) {
console.log('button was clicked');
fetch('/clicked', {method: 'POST'})
.then(function(response) {
if(response.ok) {
console.log('click was recorded');
[nodemon] to restart at any time, enter `rs`
[nodemon] watching path(s): *.*
[nodemon] watching extensions: js,mjs,json
[nodemon] starting `babel-node src/server/server.js`
C:\Users\Tunji545\Downloads\React\Fulljs\src\public\bible.jpg:1
����
SyntaxError: Invalid or unexpected token
at wrapSafe (internal/modules/cjs/loader.js:1053:16)
@Tunji545
Tunji545 / eslint_prettier_airbnb.md
Created August 3, 2020 01:20 — forked from bradtraversy/eslint_prettier_airbnb.md
ESLint, Prettier & Airbnb Setup

VSCode - ESLint, Prettier & Airbnb Setup

1. Install ESLint & Prettier extensions for VSCode

Optional - Set format on save and any global prettier options

2. Install Packages

npm i -D eslint prettier eslint-plugin-prettier eslint-config-prettier eslint-plugin-node eslint-config-node
@Tunji545
Tunji545 / fcc-personal-portfolio.markdown
Created April 20, 2020 01:47
FCC: Personal Portfolio
@Tunji545
Tunji545 / fcc-product-landing-page.markdown
Created April 20, 2020 01:42
FCC: Product Landing Page
@Tunji545
Tunji545 / fcc-technical-documentation-page.markdown
Created April 20, 2020 01:38
FCC: Technical Documentation Page