Skip to content

Instantly share code, notes, and snippets.

View otoo-peacemaker's full-sized avatar
👨‍💻
Program Focuser

Peacemaker Otoo otoo-peacemaker

👨‍💻
Program Focuser
View GitHub Profile
const collectionName = 'downloads';
// Create or update the document with the matching fileId
const fileId = '1234';
const downloadCount = 1;
const email = '';
// Options for findOneAndUpdate method
const options = { upsert: true, new: true };
@otoo-peacemaker
otoo-peacemaker / AndroidManifest.xml
Last active December 19, 2022 11:10
How to get application context everywhere in your android application using manual Dependency Injection.
<Application
..........
android:name=".MyApplication"
............
@otoo-peacemaker
otoo-peacemaker / Circle.kt
Created October 27, 2022 07:51
Stage 1 Task: Mobile
import kotlin.time.times
/**
* Write a program that creates a [Circle] with the first constructor,
* a circle with the second constructor and a circle with the third constructor.
* Then print the area, circumference, description and color of each circle.
* [Notice] : Please kindly note that steps 2-4 is covered ones in the class constructor where:
@otoo-peacemaker
otoo-peacemaker / FrontendFrameworksPopularity.md
Created October 11, 2022 09:34 — forked from tkrotoff/FrontendFrameworksPopularity.md
Front-end frameworks popularity (React, Vue, Angular and Svelte)

Findings: React is by far the most popular front-end framework/library (and continues to grow faster). In addition, React is more loved and "wanted" than other front-end frameworks (although it is more used: satisfaction tends to decrease with popularity).

Charts are from different sources and thus colors are inconsistent, please carefully read the chart's legends.

Like this? Check React Native vs Flutter: https://gist.github.com/tkrotoff/93f5278a4e8df7e5f6928eff98684979

Stack Overflow trends

https://insights.stackoverflow.com/trends?tags=reactjs%2Cvue.js%2Cangular%2Csvelte%2Cangularjs%2Cvuejs3

@otoo-peacemaker
otoo-peacemaker / Build.gradle
Created May 1, 2021 22:54 — forked from CopyAndPasteHub/Build.gradle
Navigation drawer with bottom bar
compile 'com.ncapdevi:frag-nav:1.0.3'
compile 'com.roughike:bottom-bar:1.3.9'
compile('com.mikepenz:materialdrawer:5.3.1@aar') {
transitive = true
}
@otoo-peacemaker
otoo-peacemaker / index.html
Created November 6, 2020 22:12
menu with awesome hover
<main class="site-wrapper">
<div class="pt-table desktop-768">
<div class="pt-tablecell page-home relative" style="background-image: url(https://images.unsplash.com/photo-1486870591958-9b9d0d1dda99?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1500&q=80);
background-position: center;
background-size: cover;">
<div class="overlay"></div>
<div class="container">
<div class="row">
<div class="col-xs-12 col-md-offset-1 col-md-10 col-lg-offset-2 col-lg-8">
@otoo-peacemaker
otoo-peacemaker / futuristic-3d-hover-effect.markdown
Created November 5, 2020 22:57
Futuristic 3D Hover Effect 🛸

Futuristic 3D Hover Effect 🛸

🛸

Usable as navigation, menu or effect

It uses CSS transform and perspective to create a unique hololens-like animation effect.

Can be used for many more use cases, you will probably have your own ideas.

This is an experimental idea, you may want to flesh it out for use in production.

@otoo-peacemaker
otoo-peacemaker / index.pug
Created November 5, 2020 22:48
Randomly generated CSS blobby nav
- const randomInRange = (min, max) => Math.floor(Math.random() * (max - min + 1)) + min
- const SECTIONS = ['HOME', 'ABOUT', 'CONTACT', 'WORK']
nav.menu(style=`--hue: ${Math.random() * 360}`)
input(type='checkbox', id='menu-toggle', class='menu__toggle')
label(for='menu-toggle', class='menu__toggle-label')
label(for='menu-toggle', class='menu__toggle-label menu__toggle-label--closer')
svg.menu__icon(preserveAspectRatio='xMinYMin', viewBox='0 0 24 24')
path(d='M3,6H21V8H3V6M3,11H21V13H3V11M3,16H21V18H3V16Z')
svg.menu__icon(preserveAspectRatio='xMinYMin', viewBox='0 0 24 24')
path(d='M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z')
@otoo-peacemaker
otoo-peacemaker / codepenchallenge-full-page-nav.markdown
Created November 5, 2020 22:46
#CodepenChallenge Full Page Nav

#CodepenChallenge Full Page Nav

A concept design of full page navigation, full of typography, and using icons as large images. I haven't used neither Javascript codes, nor a CSS preprocessors here.

A Pen by kwesi_welbred on CodePen.

License.

@otoo-peacemaker
otoo-peacemaker / index.html
Created November 5, 2020 22:44
menu with awesome hover
<main class="site-wrapper">
<div class="pt-table desktop-768">
<div class="pt-tablecell page-home relative" style="background-image: url(https://images.unsplash.com/photo-1486870591958-9b9d0d1dda99?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1500&q=80);
background-position: center;
background-size: cover;">
<div class="overlay"></div>
<div class="container">
<div class="row">
<div class="col-xs-12 col-md-offset-1 col-md-10 col-lg-offset-2 col-lg-8">