Skip to content

Instantly share code, notes, and snippets.

View BolajiAyodeji's full-sized avatar
🥑
Working from home

Bolaji Ayodeji BolajiAyodeji

🥑
Working from home
View GitHub Profile
@tatianamac
tatianamac / tatiana-mac-speaker-rider.md
Last active April 22, 2025 22:44
Tatiana Mac's Speaker Rider

Speaker Rider

by Tatiana Mac

Last updated 14 April 2021

What is a speaker rider?

As speaking comes with immense privilege, I have crafted a speaker rider to set expectations and boundaries around my engagement. I am grateful to all the conference organisers who have brilliantly hosted me. I would love to continue to exercise this privilege to speak at conferences, and use this privilege to make the landscape more accessible and beneficial to tech's most historically excluded and marginalised communities.

Considerations

😫 I provide a lot of explanations for those of you who never had to consider these things. Most thoughtful conferences I've attended check most of these boxes intrinsically, particularly when conference runners are experienced speakers. They get it.

@rachelandrew
rachelandrew / smashing-template.md
Last active January 15, 2023 23:31
Template for Smashing Magazine authors

Authors Guide: Article Template

Please submit your article including all of the information below. You can include this as a seperate file if you like - but please complete each section. Please use an online service to write your article, for example Dropbox Paper, Draft.in, Google Docs. For more help, see the editorial guide

Article Title

Ideally under 67 characters, what problem does this article solve?

Quick Summary

@dabit3
dabit3 / GOTApp.js
Created May 13, 2019 18:44
Game of thrones app build with GraphQL & React Native
import React, {useState, useEffect} from 'react';
import {StyleSheet, Text, View, Image} from 'react-native';
import { API, graphqlOperation } from 'aws-amplify'
const query = `
query listCharacters {
listCharacters {
items {
id name description avatar
import React from "react"
import ReactDOM from "react-dom"
function App() {
const date = new Date()
const hours = date.getHours()
let timeOfDay
if (hours < 12) {
timeOfDay = "morning"
@BolajiAyodeji
BolajiAyodeji / regexCheatSheet.js
Created April 16, 2019 19:40
A Regular Expressions Cheat Sheet
let regex;
/* matching a specific string */
regex = /hello/; // looks for the string between the forward slashes (case-sensitive)... matches "hello", "hello123", "123hello123", "123hello"; doesn't match for "hell0", "Hello"
regex = /hello/i; // looks for the string between the forward slashes (case-insensitive)... matches "hello", "HelLo", "123HelLO"
regex = /hello/g; // looks for multiple occurrences of string between the forward slashes...
/* wildcards */
regex = /h.llo/; // the "." matches any one character other than a new line character... matches "hello", "hallo" but not "h\nllo"
regex = /h.*llo/; // the "*" matches any character(s) zero or more times... matches "hello", "heeeeeello", "hllo", "hwarwareallo"
@mikowl
mikowl / oneliners.js
Last active February 19, 2025 05:20
👑 Awesome one-liners you might find useful while coding.
// Inspired by https://twitter.com/coderitual/status/1112297299307384833 and https://tapajyoti-bose.medium.com/7-killer-one-liners-in-javascript-33db6798f5bf
// Remove any duplicates from an array of primitives.
const unique = [...new Set(arr)]
// Sleep in async functions. Use: await sleep(2000).
const sleep = (ms) => (new Promise(resolve => setTimeout(resolve, ms)));
// or
const sleep = util.promisify(setTimeout);
@BolajiAyodeji
BolajiAyodeji / prototypes-cheat-sheet.js
Created March 15, 2019 15:49
JavaScript Prototypes Cheat Sheet.
// Every object (except the root object) has a prototype (parent).
// To get the prototype of an object:
Object.getPrototypeOf(obj);
// In Chrome, you can inspect "__proto__" property. But you should
// not use that in the code.
// To get the attributes of a property:
Object.getOwnPropertyDescriptor(obj, 'propertyName');
// for... in loop
let start = performance.now();
let obj = {
key1: "value1",
key2: "value2",
key3: "value3"
}
for (let key in obj) {
let value = obj[key];
console.log(key, value);
@BolajiAyodeji
BolajiAyodeji / filter-map-reduce.js
Last active March 2, 2019 21:53
Understand filter(), map(), reduce() in 10 seconds
// FILTER(), MAP(), REDUCE()
const boxs = [1, 3, 5, 8, 6, 7, 9];
// FITER()
// This method creates a new array if the items of an array pass a certain condition.
const boxFilter = boxs.filter(box => {
if (box > 3) {
return box;
}
@jpinnix
jpinnix / git-cheat-sheet.md
Created February 18, 2019 22:07
git-cheat-sheet.md
command usage
git init Creates an empty Git repository in the specified directory.
git clone Clones a repository located at onto your local machine.
git add Stages only the specified changes for the