Skip to content

Instantly share code, notes, and snippets.

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

Otman Bouchari obouchari

🏠
Working from home
View GitHub Profile
@obouchari
obouchari / jwtRS256.sh
Created July 15, 2022 15:04 — forked from ygotthilf/jwtRS256.sh
How to generate JWT RS256 key
ssh-keygen -t rsa -b 4096 -m PEM -f jwtRS256.key
# Don't add passphrase
openssl rsa -in jwtRS256.key -pubout -outform PEM -out jwtRS256.key.pub
cat jwtRS256.key
cat jwtRS256.key.pub
@obouchari
obouchari / .eslintrc.js
Created December 9, 2021 07:55
Basic config for ESlint and Prettier
module.exports = {
extends: ['airbnb', 'plugin:prettier/recommended', 'prettier/react'],
env: {
browser: true,
commonjs: true,
es6: true,
jest: true,
node: true,
},
rules: {
import 'package:flutter/material.dart';
import 'first_page.dart';
import 'second_page.dart';
class BottomNavigationBarController extends StatefulWidget {
@override
_BottomNavigationBarControllerState createState() =>
_BottomNavigationBarControllerState();
}
@obouchari
obouchari / fp.js
Created January 10, 2018 22:43
FP pipe and compose util functions in ES2015
// Pipe
const pipe = (...fns) =>
(...input) =>
fns.reduce(function(input, fn) {
if (typeof fn !== 'function') {
throw Error(`expect a "function" instead got "${typeof fn}".`);
}
return fn(...[].concat(input));
}, input);
@obouchari
obouchari / CSS: Image replacement
Last active December 23, 2015 03:49
CSS: Image replacement
.hide {
bottom: 0;
font: 0/0 a;
text-shadow: none;
color: transparent;
background-color: transparent;
}