Skip to content

Instantly share code, notes, and snippets.

View MohammadAzimi's full-sized avatar
🧐
["curious", "learner", "forward", "patient"];

Mohammad Azimi MohammadAzimi

🧐
["curious", "learner", "forward", "patient"];
View GitHub Profile
@hirbod
hirbod / withDisableForcedDarkModeAndroid.js
Last active May 2, 2024 09:26
Expo Config Plugin to disable forced Dark mode.
// disable forced dark mode to prevent weird color changes on
// certain android devices (Xiaomi MIUI and others enforcing dark mode with view analyzing)
// create a file like "plugins/withDisableForcedDarkModeAndroid.js". Insert this content and edit your app.config.js/app.json
/*
"expo": {
...
...
...
"plugins": [
@EvanBacon
EvanBacon / 🧽.gif
Last active February 6, 2024 08:40
🥓
🧽.gif
@derekstavis
derekstavis / FastList.tsx
Last active April 30, 2024 14:50 — forked from vishnevskiy/FastList.js
Discord's FastList, but in TypeScript
import { forEachObjIndexed } from "ramda";
import * as React from "react";
import {
Animated,
ScrollView,
View,
ViewStyle,
LayoutChangeEvent,
NativeScrollEvent,
} from "react-native";
@srikanthsunkari
srikanthsunkari / [Updated]webpack.config.js
Last active June 26, 2023 12:16
react native web with webpack configuration
// web/webpack.config.js
const path = require('path');
const webpack = require('webpack');
const appDirectory = path.resolve(__dirname, '../');
// This is needed for webpack to compile JavaScript.
// Many OSS React Native packages are not compiled to ES5 before being
// published. If you depend on uncompiled packages they may cause webpack build
@heaversm
heaversm / openCV-portait-camera-android.java
Last active March 29, 2024 18:30
Renders openCV's camera in portrait mode on android - to be placed in `CameraBridgeViewBase.java`
private final Matrix mMatrix = new Matrix();
private void updateMatrix() {
float mw = this.getWidth();
float mh = this.getHeight();
float hw = this.getWidth() / 2.0f;
float hh = this.getHeight() / 2.0f;
float cw = (float)Resources.getSystem().getDisplayMetrics().widthPixels; //Make sure to import Resources package
@soheilhy
soheilhy / nginxproxy.md
Last active May 8, 2024 09:56
How to proxy web apps using nginx?

Virtual Hosts on nginx (CSC309)

When hosting our web applications, we often have one public IP address (i.e., an IP address visible to the outside world) using which we want to host multiple web apps. For example, one may wants to host three different web apps respectively for example1.com, example2.com, and example1.com/images on the same machine using a single IP address.

How can we do that? Well, the good news is Internet browsers