Skip to content

Instantly share code, notes, and snippets.

View smhmd's full-sized avatar

simohamed smhmd

View GitHub Profile
@smhmd
smhmd / svgr.d.ts
Created June 10, 2021 11:35
@svgr/core types
// source: https://github.com/gregberge/svgr/issues/513
// (modified)
// make sure to add this file to your tsconfig.json#includes array
declare module "@svgr/core" {
export type TemplateOptions = SvgrOpts;
export interface TemplateData {
imports?: string[];
interfaces?: string[];
@smhmd
smhmd / .gitignore
Created March 29, 2021 13:07
Using Firebase Emulator Suite and React for local-first development
firebase-debug.log*
firestore-debug.log*
ui-debug.log*
@smhmd
smhmd / tailwind-config.d.ts
Last active June 14, 2021 20:16
TailwindCSS Types
/**
* Original source: https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/tailwindcss/tailwind-config.d.ts
* The types from `@types/tailwindcss` only cover the default configuration.
*/
export type Variant =
| 'responsive'
| 'first'
| 'last'
| 'odd'
@smhmd
smhmd / eslint-in-nextjs.md
Created February 28, 2021 22:24
Eslint in Next.js
$ yarn add -D eslint prettier husky lint-staged eslint-config-prettier eslint-plugin-import eslint-plugin-prettier eslint-plugin-react eslint-plugin-react-hooks @typescript-eslint/eslint-plugin @typescript-eslint/parser eslint-plugin-jsx-a11y eslint-plugin-simple-import-sort

.eslintrc:

{
  "env": {
    "browser": true,
    "es2021": true,
@smhmd
smhmd / surfingkeys.js
Created March 11, 2020 04:08
Surfingkeys Configuration
map('\'', 'p'); unmap('p');
@smhmd
smhmd / peerflix-hook.lua
Created June 12, 2019 02:30 — forked from ekisu/peerflix-hook.lua
A Lua user script for mpv that allows playing of magnet links, similar to the youtube-dl hook.
local utils = require 'mp.utils'
local msg = require 'mp.msg'
-- OPTIONS
local keep_file_after_streaming = false
local peerflix = {
path = "peerflix",
searched = false
}