Skip to content

Instantly share code, notes, and snippets.

View mayokunadeniyi's full-sized avatar
🔁
Learning & Building

Mayokun Adeniyi mayokunadeniyi

🔁
Learning & Building
  • London, UK
View GitHub Profile
@mayokunadeniyi
mayokunadeniyi / remove_DS_Store.md
Created July 4, 2020 17:03
Remove .DS_Store or any other file from you projects.

Remove existing files from the repository:

find . -name .DS_Store -print0 | xargs -0 git rm -f --ignore-unmatch Add the line

.DS_Store to the file .gitignore, which can be found at the top level of your repository (or created if it isn't there already). You can do this easily with this command in the top directory

echo .DS_Store >> .gitignore

@mayokunadeniyi
mayokunadeniyi / LiveDataTestUtil.kt
Created July 4, 2020 02:24
Useful extension functions to unit test LiveData
import androidx.annotation.VisibleForTesting
import androidx.lifecycle.LiveData
import androidx.lifecycle.Observer
import java.util.concurrent.CountDownLatch
import java.util.concurrent.TimeUnit
import java.util.concurrent.TimeoutException
/**
* This function observes a LiveData until it receives a new value (via onChanged) and then
@mayokunadeniyi
mayokunadeniyi / vlcplaylistgenerator.py
Created June 30, 2020 03:22
A python script to create playlist of videos/songs in a directory for VLC.
import xml.etree.ElementTree as xml
import os
ext_list = ['.mp4', '.mkv', '.avi', '.flv', '.mov', '.wmv', '.vob',
'.mpg','.3gp', '.m4v'] #List of extensions to be checked.
check_subdirectories = True #Set false to get files only from cwd.
class Playlist:
"""Build xml playlist."""
You can resize images or gifs in the comment section too. Just upload the stuff first
Demo: This PR creates the classes screen for both the Parent/Student and the Tutor.
<img src="THE_LINK_FOR_THE_STUFF_AFTER_IT_HAS_UPLOADED_TO_THE_COMMENT_SECTION" width="300" height="600" />
@mayokunadeniyi
mayokunadeniyi / Read-from-console.kt
Created June 7, 2020 18:38
A list of handy functions for reading from the console using Kotlin
private fun readln() = readLine()!!
private fun readlnByte() = readln().toByte()
private fun readlnShort() = readln().toShort()
private fun readlnInt() = readln().toInt()
private fun readlnLong() = readln().toLong()
private fun readlnFloat() = readln().toFloat()
private fun readlnDouble() = readln().toDouble()
private fun readlnBigInt(radix: Int = 10) = readln().toBigInteger(radix)
private fun readlnBigDecimal() = readln().toBigDecimal()
@mayokunadeniyi
mayokunadeniyi / Anims.xml
Last active May 1, 2020 11:43
A gist for some animations
//Fade in
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android"
android:interpolator="@android:anim/accelerate_decelerate_interpolator">
<alpha
android:duration="1200"
android:fromAlpha="0.0"
android:toAlpha="1.0" />
</set>
@mayokunadeniyi
mayokunadeniyi / keybase.md
Created December 29, 2019 19:58
Keybase verification

Keybase proof

I hereby claim:

  • I am mayokunthefirst on github.
  • I am mayokunadeniyi (https://keybase.io/mayokunadeniyi) on keybase.
  • I have a public key ASBJP5YUMx-P3IbHH_1wWiVzn_SBUE86ndjCgDXNZJPIYwo

To claim this, I am signing this object:

1. Clone your fork:

git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
@mayokunadeniyi
mayokunadeniyi / gist:85331ad2e2cde028fa0dbaaeeb4503fa
Created June 4, 2019 17:47 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@mayokunadeniyi
mayokunadeniyi / Main.java
Created March 29, 2019 19:57
Main class used to explain the concept of dynamic binding under polymorphism
package com.company;
public class Main {
public static void main(String[] args) {
Animal soundProduced = new Lion();
soundProduced.sound();
}
}