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
/*
Most map tile providers use 256px square tiles so Leaflet's basic zoom algorithm looks like this:
256 * Math.pow(2, zoom);
If you're working with vector layers you can extend one of leaflet's default CRSs
and make it return tile sizes in smaller increments. This can be very helpful when using
fitBounds() with layer groups, so the zoomed group fits better within the map bounds:
E.g., extending L.CRS.EPSG3857 (the default CRS):
@gausoft
gausoft / ejabberd init.d script
Created April 16, 2018 16:28
A startup script for ejabberd
#! /bin/sh
#
# ejabberd Startup script for the ejabberd server
#
# chkconfig: 345 15 85
# description: The ejabberd instant messaging server is software to communicate \
# and collaborate in real-time between two or more people based on typed text
# processname: ejabberd
set -o errexit
@gausoft
gausoft / paginate.php
Last active January 10, 2020 13:08 — forked from ctf0/paginate.php
Laravel Paginate Collection or Array
<?php
// use Illuminate\Support\Collection;
// use Illuminate\Pagination\Paginator;
// use Illuminate\Pagination\LengthAwarePaginator;
/**
* Génère la pagination des éléments dans un tableau ou une collection.
*
* @param array|Collection $items
@gausoft
gausoft / force-https-in-htaccess
Created February 5, 2020 09:59 — forked from koffisani/force-https-in-htaccess
Pour forcer l'utilisation d'une connexion SSL sur votre site web
###############################################
#Pour forcer l'utilisation d'une connexion SSL sur votre site web, veuillez placer le contenu suivant dans un fichier .htaccess
###############################################
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^(.*)$ https://%{SERVER_NAME}/$1 [R=301,L]
@gausoft
gausoft / force-https-in-htaccess
Created February 5, 2020 09:59 — forked from koffisani/force-https-in-htaccess
Pour forcer l'utilisation d'une connexion SSL sur votre site web
###############################################
#Pour forcer l'utilisation d'une connexion SSL sur votre site web, veuillez placer le contenu suivant dans un fichier .htaccess
###############################################
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^(.*)$ https://%{SERVER_NAME}/$1 [R=301,L]
@gausoft
gausoft / gist:3142059b7c837fc77b25f1e944e0525b
Created April 4, 2020 15:24 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@gausoft
gausoft / CustomerMarker.dart
Last active February 6, 2023 15:40
Dart Customer marker drown with custom painter
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
debugShowCheckedModeBanner: false,
@gausoft
gausoft / marker_draw.dart
Last active October 23, 2021 23:42
Custom marker with dart paint
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Custom marker',
debugShowCheckedModeBanner: false,
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Awesome cards',
debugShowCheckedModeBanner: false,
<?php
namespace Tests\Feature;
use App\User;
use Tests\TestCase;
use Livewire\Livewire;
use Illuminate\Support\Facades\Route;
use Illuminate\Foundation\Testing\RefreshDatabase;