Skip to content

Instantly share code, notes, and snippets.

View mouadziani's full-sized avatar
🕶️
Trance, NEVER been boring

Mouad Ziani mouadziani

🕶️
Trance, NEVER been boring
View GitHub Profile
@RobertAKARobin
RobertAKARobin / safari.md
Last active December 5, 2024 01:38
Safari's date-picker is the cause of 1/3 of our customer support issues

Safari's date-picker is the cause of 1/3 of our customer support issues

...and obviously we're building a workaround. But I'm absolutely flabbergasted that a standard <input type="date"> HTML field, in a standard browser, from a company that bases its reputation good design, could be so dreadful.

The context

I'm the developer for a startup that sells a genetic test to recommend medications for high blood pressure. For medical reasons we need to know our customers' birth date. Most of our customers are in their 60s or older. We've found that many of them use iPads or iPhones. And they're the ones who complain to our customer support that our site is unusable.

The problem

<?xml version="1.0" encoding="UTF-8"?>
<phpunit
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
bootstrap="vendor/autoload.php"
colors="true"
executionOrder="random"
>
<testsuites>
<testsuite name="Tests">
@skiod
skiod / tld-list
Last active January 7, 2023 15:36
All domain extensions listed and grouped from A to Z.
[
".aaa",
".aarp",
".abarth",
".abb",
".abbott",
".abbvie",
".abc",
".able",
".abogado",
@inxilpro
inxilpro / README.md
Created July 22, 2022 21:01
Fully namespaced Tailwind config for widget or embeddable component

Sometimes you need to publish a CSS file for 3rd-party consumption (i.e. default styles for an embeddable JS widget). This set up lets you continue to use Tailwind, but scope all your styles to a specific selector.

Simply replace .internachi with your own widget namespace, set up Tailwind as you please, and run generate.sh to build a custom version of your Tailwind styles that won't interfere with other CSS rules (including the Tailwind reset).

@SamuelMwangiW
SamuelMwangiW / pint-fixer.yaml
Last active January 13, 2024 14:58
A Laravel pint config json and Github workflow to ensure every push is formated uniformly
name: Check & fix styling
on: [push]
permissions:
contents: write
jobs:
pint-fixer:
runs-on: ubuntu-latest
<?php
use Illuminate\Support\Facades\Route;
use Illuminate\Support\Str;
use Spatie\YamlFrontMatter\YamlFrontMatter;
Route::get('{slug?}', function ($slug = 'index') {
$path = resource_path('pages/' . $slug . '.md');
if (!file_exists($path)) {
@mahbodsh
mahbodsh / ProductResourceCollection.php
Last active July 13, 2023 03:42
Pagination helper in laravel resource
<?php
namespace App\Http\Resources;
use App\Helpers\ResourcePaginationHelper;
use Illuminate\Http\Resources\Json\ResourceCollection;
class ProductsResourceCollection extends ResourceCollection
{
/**
@itszechs
itszechs / cr_account_check.py
Created June 1, 2021 14:56
Python function to check is crunchyroll account is premium or not
import requests
def test_account(email, password):
user_login = requests.post('https://beta-api.crunchyroll.com/auth/v1/token',
{
'username': email,
'password': password,
'grant_type': 'password',
@jenky
jenky / AwsCognitoIdentitySRP.php
Last active October 7, 2024 13:17
AWS Cognito Identity SRP authentication helper
<?php
use Aws\AwsClient;
use Aws\Result;
use Carbon\Carbon;
use phpseclib3\Math\BigInteger;
class AwsCognitoIdentitySRP
{
const N_HEX = 'FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD1'.
@heytulsiprasad
heytulsiprasad / tailwind.js
Created September 4, 2020 17:55
Config tailwind to desktop first approach
module.exports = {
theme: {
extend: {},
screens: {
xl: { max: "1279px" },
// => @media (max-width: 1279px) { ... }
lg: { max: "1023px" },
// => @media (max-width: 1023px) { ... }