Skip to content

Instantly share code, notes, and snippets.

View gomorizsolt's full-sized avatar
👋
Hey!

Zsolt Gomori gomorizsolt

👋
Hey!
View GitHub Profile
{
"Ansi 5 Color" : {
"Red Component" : 0.80392158031463623,
"Color Space" : "sRGB",
"Blue Component" : 0.80392158031463623,
"Alpha Component" : 1,
"Green Component" : 0
},
"Tags" : [
@gomorizsolt
gomorizsolt / macos_dev_setup.md
Last active October 11, 2023 18:03
Set up macOS from Scratch

Set up macOS from Scratch

I did regret having no reference which I could have referred back to earlier. As a result, I've put together this gist, so that it guides me through the same process I follow when I completely reinstall the system every so often.

Borrowed a couple of steps and pieces of advice from https://gist.github.com/millermedeiros/6615994.

Run software update

First off, make sure everything's is up to date. To do so, head over to "System Preferences" -> "Software Update".

@gomorizsolt
gomorizsolt / Example.js
Created March 19, 2019 14:15
Webpack - eliminate long imports - example
import Something from "~/path/to/Something.js";
@gomorizsolt
gomorizsolt / webpack.config.js
Created March 19, 2019 14:07
Webpack - eliminate long imports
module.exports = {
// ...
resolve: {
alias: {
"~": path.resolve(__dirname, "src/"),
}
}
};
@gomorizsolt
gomorizsolt / fetchHook.js
Last active June 4, 2019 15:05
Generic fetch hook
import { useState, useEffect } from "react";
export const useGenericFetch = (fetchFunction, ...args) => {
const defaultState = {
data: null,
isLoading: true,
err: false
};
const [data, setData] = useState(defaultState);
@gomorizsolt
gomorizsolt / package.json
Last active March 11, 2019 07:30
React and Jest - handle non-Javascript files
// The mock file can be something like this:
// module.exports = "test-file-stub";
"jest": {
"moduleNameMapper": {
".+\\.(jpg|jpeg|png)$": "<rootDir>/path/to/your/mock/file"
}
}
"jest": {
"moduleNameMapper": {
".+\\.(css|styl|less|sass|scss|png|jpg|ttf|woff|woff2)$": "identity-obj-proxy"
}
}
wrapper = shallow(shallow(<MyComponent />).get(0));