Skip to content

Instantly share code, notes, and snippets.

View Ayobami0's full-sized avatar

Ayobami0

View GitHub Profile
@mischw
mischw / convert_unicode_nerdfont3.py
Last active December 29, 2023 01:07
Converts the unicode characters to the new range introduced in nerdfont 3. Conversion based on this table: https://github.com/ryanoasis/nerd-fonts/issues/1059#issuecomment-1404891287
#!/usr/bin/env python3
trans_dict = {
'\U0000f500': '\U000f0001', # vector_square
'\U0000f501': '\U000f0003', # access_point
'\U0000f502': '\U000f0002', # access_point_network
'\U0000f503': '\U000f0004', # account
'\U0000f504': '\U000f0005', # account_alert
'\U0000f505': '\U000f0006', # account_box
'\U0000f506': '\U000f0007', # account_box_outline
@joaquinicolas
joaquinicolas / gist:b7d0a0869485bca5156d0d4be87820f4
Created December 15, 2021 02:59
Setup flutter environment in arch linux
pacman -S --needed git base-devel
git clone https://aur.archlinux.org/yay.git
cd yay
makepkg -si
yay -S flutter
java -version
sudo pacman -S jre8-openjdk
@jas-haria
jas-haria / Custom Offset Pagination in SQL Alchemy
Created August 9, 2020 08:55
Implementation of offset pagination in Python using SQL Alchemy Query
def paginate(query, page_number, page_limit):
length = query.count()
if page_number > 0:
query = query.offset((page_number)*page_limit)
query = query.limit(page_limit)
return {'totalLength': length, 'content': convert_list_to_json(query.all())}