Skip to content

Instantly share code, notes, and snippets.

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

Gauthier Eholoum gausoft

🏠
Working from home
View GitHub Profile
@gausoft
gausoft / main.dart
Created November 23, 2022 08:20
Counter example
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Chatiii',
debugShowCheckedModeBanner: false,
@gausoft
gausoft / riverpod-Provider.dart
Last active August 18, 2022 14:37
Expose data with riverpod's simple Provider
// Example 01 : Simple scallar type
final valueProvider = Provider<int>((ref) {
return 36;
});
// Example 02
final databaseProvider = Provider((ref) => Database());
// Example 03 : Real class as dependency injection
final httpClientProvider = Provider<Dio>((ref) => Dio());
@gausoft
gausoft / main.dart
Created August 18, 2022 00:00
Wrapp ProviderScope arrond Root Widget
// main.dart
void main() {
runApp(
/// A widget that stores
/// the state of providers.
const ProviderScope(
child: MyApp(),
),
);
@gausoft
gausoft / pubspec.yaml
Created August 17, 2022 23:58
Add flutter_riverpod dependancy
# pubspec.yaml
dependencies:
flutter:
sdk: flutter
flutter_riverpod: ^1.0.4
# Prerelease: 2.0.0-dev.9
@gausoft
gausoft / Statamic TailwindCSS Pagination.antlers.html
Last active April 21, 2022 01:07
Statamic CMS collections pagination styled with TailwindCSS
{{ paginate }}
<ul class="pagination flex flex-row justify-center items-center">
{{ if prev_page }}
<li>
<a href="{{ prev_page }}"
class="relative inline-flex items-center px-2 py-2 rounded-l-md border border-gray-300 bg-white text-sm font-medium text-gray-500 hover:bg-gray-50">
<span class="sr-only">Préc.</span>
<!-- Heroicon name: solid/chevron-left -->
<svg class="h-5 w-5" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor"
aria-hidden="true">
CREATE AN APP
1.a
laravel new APPNAME
1.b: or:
composer create-project laravel/laravel APPNAME
cmd:
cd name-of-your-project
php artisan -v

Matcher tous les nombres entiers ou décimaux suivi ou non d'espace et terminer par Mo ou Go

(\d+([\.,]?\d+?)?)+\s?[Mo|Go]

Tester le regex

@gausoft
gausoft / .gitconfig
Created October 13, 2021 07:13 — forked from yzraeu/.gitconfig
git config aliases
[alias]
a = add --all
ai = add -i
#############
ap = apply
as = apply --stat
ac = apply --check
#############
ama = am --abort
amr = am --resolved
@gausoft
gausoft / ! PHP Scripts
Created May 30, 2021 10:38 — forked from yohanesgultom/! PHP Scripts
Random PHP scripts
Random PHP scripts