Skip to content

Instantly share code, notes, and snippets.

View erlangparasu's full-sized avatar

Erlang Parasu erlangparasu

View GitHub Profile
@Albert221
Albert221 / JetBrains-Mono.css
Last active March 5, 2025 17:39
CSS for using JetBrains Mono on the Web. Simply copy&paste it to your stylesheet.
@font-face {
font-family: 'JetBrains Mono';
src: url('https://cdn.jsdelivr.net/gh/JetBrains/JetBrainsMono/web/woff2/JetBrainsMono-Bold-Italic.woff2') format('woff2'),
url('https://cdn.jsdelivr.net/gh/JetBrains/JetBrainsMono/web/woff/JetBrainsMono-Bold-Italic.woff') format('woff');
font-weight: 700;
font-style: italic;
font-display: swap;
}
@font-face {
(String filename, String url) async {
var request = http.MultipartRequest('POST', Uri.parse(url));
request.files.add(
http.MultipartFile(
'picture',
File(filename).readAsBytes().asStream(),
File(filename).lengthSync(),
filename: filename.split("/").last
)
);
@mavieth
mavieth / domains.json
Created January 25, 2020 18:19
Common Email Domains
[
"aol.com",
"att.net",
"comcast.net",
"facebook.com",
"gmail.com",
"gmx.com",
"googlemail.com",
"google.com",
"hotmail.com",
@diegopacheco
diegopacheco / actix_netty_vs_fastify.md
Last active July 28, 2023 19:33
Actix(Rust) VS Netty(Java) VS Fastify(Nodejs)

Fastify did 6K RPS (Request per Second)
Netty did 23K RPS (Request Per Second)
Actix did 53K RPS (Request Per Second)

Actix 1ms latency
Netty 4ms latency
Fastify 14ms latency

npm install -g autocannon
@gabrielemariotti
gabrielemariotti / README.MD
Last active September 24, 2024 09:22
How to use the ShapeableImageView.

The Material Components Library introduced with the 1.2.0-alpha03 the new ShapeableImageView.

In your layout you can use:

 <com.google.android.material.imageview.ShapeableImageView
      android:id="@+id/image_view"
      app:srcCompat="@drawable/..." />

Then in your code apply the ShapeAppearanceModel to define your custom corners:

@enepomnyaschih
enepomnyaschih / base64.js
Last active March 17, 2025 03:14
https://www.npmjs.com/package/byte-base64 - Encode JS Uint8Array, simple array of bytes or native JS string to base64 and back
/*
MIT License
Copyright (c) 2020 Egor Nepomnyaschih
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
@felangel
felangel / main.dart
Created June 26, 2019 02:52
Flutter Bloc Stepper
import 'dart:async';
import 'package:flutter/material.dart';
import 'package:bloc/bloc.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:equatable/equatable.dart';
abstract class StepperEvent extends Equatable {
StepperEvent([List props = const []]) : super(props);
}
@laravel-shift
laravel-shift / .php-cs-fixer.php
Last active March 29, 2025 12:18
PHP CS Fixer - Laravel Coding Style Ruleset
<?php
use PhpCsFixer\Config;
use PhpCsFixer\Finder;
$rules = [
'array_indentation' => true,
'array_syntax' => ['syntax' => 'short'],
'binary_operator_spaces' => [
'default' => 'single_space',
@aravindhkumar23
aravindhkumar23 / main.dart
Last active January 9, 2024 07:05
Clipping widgets with bezier curves in Flutter
//access the wavy header in body by below code
return Scaffold(
body: Container(height:200.0,child: new WavyHeader()),
);
//creates a curve with 3 curves merged by using stack
// ref link
https://iirokrankka.com/2017/09/04/clipping-widgets-with-bezier-curves-in-flutter/
@hiroaki-yamamoto
hiroaki-yamamoto / handle_code_137_docker.md
Last active July 22, 2024 16:36
How to handle exit code 137 on docker

Problem

When you use docker with "multiple commands", you will write scripts like this:

run.sh

#!/bin/sh -e

pip install --upgrade poetry
poetry config settings.virtualenvs.create false
poetry install