Skip to content

Instantly share code, notes, and snippets.

View oxwazz's full-sized avatar
🐒

Muhammad Rahmahalim oxwazz

🐒
View GitHub Profile
@john-guerra
john-guerra / README.md
Last active May 29, 2024 12:33
Mongo Airbnb Sample Database

The mongo airbnb sample database

Import it into your local mongo with:

mongoimport -h localhost:27017 --db sample_airbnb --collection listingsAndReviews --file listingsAndReviews.json
@ivandoric
ivandoric / all.tsx
Created May 30, 2021 09:28
Infinite Scroll And Filters With React Query
import Container from "components/ui/Container"
import VideoCard from "components/VideoCard"
import fetchData from "helpers/fetchData"
import { useEffect, useState, Fragment, useRef } from "react"
import { useInfiniteQuery } from "react-query"
import useIntersectionObserver from "../hooks/useIntersectionObserver"
import Select from "react-select"
import { useUIDSeed } from "react-uid"
import { useRouter } from "next/router"
import Seo from "components/Seo"
@pmkay
pmkay / installing-postman.md
Created April 27, 2020 02:49 — forked from ba11b0y/installing-postman.md
Installing Postman on Ubuntu/Gnome

Since Chrome apps are now being deprecated. Download postman from https://dl.pstmn.io/download/latest/linux

Although I highly recommend using a snap

sudo snap install postman

Installing Postman

tar -xzf Postman-linux-x64-5.3.2.tar.gz
@arifmahmudrana
arifmahmudrana / joi-locale.ts
Created January 21, 2020 13:05
joi localization internationalization error messages
import { object, string, number, ValidationError } from '@hapi/joi';
const schema = object({
searchCode: string()
.required()
.label('Search code'),
id: number().required()
}),
messages = {
'alternatives.all': '{{#label}} does not match all of the required types',
@bradtraversy
bradtraversy / vscode_shortcuts.md
Last active July 29, 2024 15:52
Helpful shortcuts for VSCode

VSCode Shortcuts

List of helpful shortcuts for faster coding

If you have any other helpful shortcuts, feel free to add in the comments of this gist :)

Official List of all commands

@nzec
nzec / README.MD
Last active May 31, 2024 02:02
DeezLoader Offical Page

Thanks to /u/zpoo32 for reporting several issues in this list!

Deemix

  • deemix: just the cli and the library
  • deemix-pyweb: the app with a GUI
  • deemix-server: just the server part of deemix-pyweb
@chrisgervang
chrisgervang / ComponentSynthetic.tsx
Last active January 7, 2024 03:59
Understanding Typescript: "allowSyntheticDefaultImports": true
// React doesn't use es2015 "export default react" syntax in their NPM dist.
// Instead they set a "default" key in their export object.
/** node_modules/react/cjs/react.development.js
...
var React$2 = Object.freeze({
default: React
});
@kevinweber
kevinweber / encodeSvg.js
Created October 31, 2016 05:36
Helper: Convert React component (SVG element) to base64 encoded URL. Useful for adding a background image.
import ReactDOMServer from 'react-dom/server';
export function encodeSvg(reactElement) {
return 'data:image/svg+xml,' + escape(ReactDOMServer.renderToStaticMarkup((reactElement)));
}
@wojteklu
wojteklu / clean_code.md
Last active July 31, 2024 18:39
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

@yayoF
yayoF / gist:224c43e34705a6e51afc725d760f7a53
Last active May 1, 2024 11:19
Install Telegram Desktop in Ubuntu
Download the telegram Desktop client here https://desktop.telegram.org/
Go to the client location in terminal and extract the package with < tar xf archive.tar.xz >
Now you have a folder called < Telegram >
Move this folder to /opt
Double-click the telegram binary in /opt/Telegram/Telegram.
Bonus: to add Telegram to de "applications" menu, right-click the icon of the runing app and choose "lock to launcher"
bon appetit
sources: