Skip to content

Instantly share code, notes, and snippets.

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

El Hadj Babacar Cissé ehbc221

🏠
Working from home
  • Sonatel SA
  • Dakar, Sénégal
  • X @ehbc221
View GitHub Profile
@ehbc221
ehbc221 / bulk-add-shadcn-components.sh
Last active July 23, 2024 15:56
Bulk add shadcn components
npx shadcn-ui@latest add accordion && npx shadcn-ui@latest add alert && npx shadcn-ui@latest add alert-dialog && npx shadcn-ui@latest add aspect-ratio && npx shadcn-ui@latest add avatar && npx shadcn-ui@latest add badge && npx shadcn-ui@latest add breadcrumb && npx shadcn-ui@latest add button && npx shadcn-ui@latest add calendar && npx shadcn-ui@latest add card && npx shadcn-ui@latest add carousel && npx shadcn-ui@latest add chart && npx shadcn-ui@latest add checkbox && npx shadcn-ui@latest add collapsible && npx shadcn-ui@latest add command && npx shadcn-ui@latest add context-menu && npx shadcn-ui@latest add table && npm install @tanstack/react-table && npx shadcn-ui@latest add dialog && npx shadcn-ui@latest add drawer && npx shadcn-ui@latest add dropdown-menu && npx shadcn-ui@latest add form && npx shadcn-ui@latest add hover-card && npx shadcn-ui@latest add input && npx shadcn-ui@latest add input-otp && npx shadcn-ui@latest add label && npx shadcn-ui@latest add menubar && npx shadcn-ui@latest add navigation
@ehbc221
ehbc221 / keystore.sh
Created July 16, 2024 15:35
Generate Android keystore
keytool -genkey -v -keystore my-release-key.keystore -alias alias_name -keyalg RSA -keysize 2048 -validity 10000
@ehbc221
ehbc221 / rename-files.sh
Created May 23, 2024 11:54
bash rename files in folder
# Example: rename all your next js files from js to ts
# Rename js files
find app/* -name "*.js" -exec sh -c 'mv "$0" "${0%.js}.ts"' {} \;
# Rename jsx files
find app/* -name "*.jsx" -exec sh -c 'mv "$0" "${0%.jsx}.tsx"' {} \;
@ehbc221
ehbc221 / wagner-fischer.java
Created February 21, 2024 09:50
Wagner Fischer algorithm for spell checkers / autocorrects
// Credits : @b001io on github
// Repo link : https://github.com/b001io/wagner-fischer/blob/main/wagner_fischer.py
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
public class Main {
@ehbc221
ehbc221 / FLUTTER_DEEPLINK_CONFIG.md
Created February 12, 2024 22:10
Flutter Deeplinks Configuration
@ehbc221
ehbc221 / spring-boot-scripts.sh
Created December 29, 2023 16:54
Spring Boot Scripts
######################################## Run jar in Backend ########################################
nohup java -jar expenza-0.0.1-SNAPSHOT.jar &
@ehbc221
ehbc221 / analysis_options.dart
Created June 24, 2023 00:21
Flutter Linting - Linter analysis_options
include: package:flutter_lints/flutter.yaml
analyzer:
errors:
dead_code: info
invalid_assignment: warning
missing_required_param: error
missing_return: error
must_be_immutable: error
exclude:
@ehbc221
ehbc221 / flutter-scripts.sh
Last active December 29, 2023 16:55
Flutter scripts for run, build, watch, rename and clean
######################################## Run Flutter ########################################
flutter run
######################################## Run the flutter build runner ########################################
flutter pub run build_runner build --delete-conflicting-outputs
######################################## Watch changes in packages the flutter build runner ########################################
flutter packages pub run build_runner watch --delete-conflicting-outputs
######################################## Sign APK (from project root) ########################################
@ehbc221
ehbc221 / rename.sh
Created June 23, 2023 13:11
Rename files containing substring recursively with shell and rnr
rnr -f -r 'old_name' 'new_name' *
@ehbc221
ehbc221 / bool.filter.dart
Last active June 8, 2023 16:56
A series of useful filters to handle searching via APIs in Flutter. Inspired from Spring boot backend ones.
import 'package:equatable/equatable.dart';
import 'package:expenza/domain/models/type/json_map.type.dart';
import 'package:expenza/mixins/to_json_field.mixin.dart';
import 'package:expenza/network/service/filter/filter.dart';
/// Filter a [bool].
///
/// - author - @ehbc221
/// - version - 1.0.0
/// - last updated - June 8th, 2023