Skip to content

Instantly share code, notes, and snippets.

View Yusadolat's full-sized avatar
🏠
Working from home

Yusuf Adeyemo Yusadolat

🏠
Working from home
View GitHub Profile
@Yusadolat
Yusadolat / user.controller.ts
Created June 13, 2023 11:14 — forked from animir/user.controller.ts
Nest.js prevent brute-force against authorisation example
import { Request, Response } from 'express';
import { Body, Controller, Post, Req, Res } from '@nestjs/common';
import { UserService } from './user.service';
import * as Redis from 'ioredis';
import { RateLimiterRedis } from 'rate-limiter-flexible';
const redisClient = new Redis({enableOfflineQueue: false});
const maxWrongAttemptsByIPperDay = 100;
const maxConsecutiveFailsByUsernameAndIP = 5;
@Yusadolat
Yusadolat / cloudWatchAlarmsToSlack.js
Created May 9, 2023 05:07 — forked from statico/cloudWatchAlarmsToSlack.js
Lambdas for Slack Notifications
const fetch = require('./fetch')
const RED = '#cd3131'
const YELLOW = '#e5e512'
const GREEN = '#05bc79'
const BLUE = '#2472c8'
exports.handler = async function(event, context) {
// Debugging
// console.log('event', JSON.stringify(event, null, 2))
@Yusadolat
Yusadolat / gist:8f8a10b71be629f86a200447a7d7bf0d
Created August 21, 2020 16:09 — forked from CristinaSolana/gist:1885435
Keeping a fork up to date

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
<template>
<div>
<div v-for="(line, index) in lines" :key="index" class="row">
<div class="col-lg-6">
<div class="row">
<div class="col-2">
<v-select
v-model="line.countryCode"
label="Country Code"
:options="countryPhoneCodes"
@Yusadolat
Yusadolat / flexbox-responsive-card-layout.markdown
Last active August 27, 2019 14:08
Flexbox - Responsive Card Layout

Flexbox - Responsive Card Layout

@Yusadolat
Yusadolat / cover-letter.md
Created July 17, 2019 22:02 — forked from ivoputzer/cover-letter.md
cover letter

Cover Letter

My name is Ivo and I am an Italian agile software developer who loves coding and solving problems in a simple yet creative fashion. During my years of web development I have grown a strong passion for fronted development which led me to a good understanding of its underlaying technologies. I love hacking the hell out of web apps and getting a grasp of cutting edge technologies in order to keep up with time and deliver the best user experience possible.

While user experience still plays a big role in what I enjoy doing, I've learnt how important it is to write stable yet maintainable and scalable backend solutions. Even though I started out with PHP, I soon naturally came closer to the NodeJS environment while still embracing more "elegant" technologies such as Ruby or Java either adopting frameworks or by implementing architectures from scratch.

I discovered the Agile Manifesto and eXtreme Programming back while joining XPeppers in 2013 and I’ve tried my best to apply either values and prin

#!/usr/bin/env ruby
require 'open-uri'
require 'pathname'
require 'json'
def strip_hash(f)
ext = f.extname
if ext.include?("?")
@import 'https://fonts.googleapis.com/css?family=Open+Sans';
* {
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
body {
font-family: 'Open Sans', sans-serif;
line-height: 1.75em;
@Yusadolat
Yusadolat / navbar.js
Created January 13, 2019 21:09
Navbar Component for https://yusadolat.me
import React from 'react'
import PropTypes from 'prop-types'
import { Link } from 'gatsby'
import Logo from '../assets/images/logo_letter.png'
import { isPostOrProject } from '../utils'
class Navbar extends React.Component {
state = {
navbarIsTop: true,
@Yusadolat
Yusadolat / UdacityDownload.py
Created December 26, 2016 14:32 — forked from vinovator/UdacityDownload.py
Python program to download course content for multiple Udacity courses neatly arranged within a folder structure
# UdacityDownload.py
# Python 2.7.6
"""
Python script to download course content from udacity courses
- Creates folders as per course names
- Downloads all the zip files
- Extract content from zip file
- Finally delete the zip file
Multiple course content can be downloaded from list