Skip to content

Instantly share code, notes, and snippets.

View humoyun91's full-sized avatar
🦅
Always eager

humoyun humoyun91

🦅
Always eager
View GitHub Profile

Online Photo Editing - FabricJS Masking

A while ago I tried implementing a photo mask tool in MockoFun which is based on FabricJS

Check out an working example: https://jsfiddle.net/codingdude/sk84xLh2/

The solution I came up was combining the built in fabric.Image.filters.BlendImage filter with a custom FabricJS brush. Here's a glimpse at my implementation of that.

(function(){
@drecali
drecali / overlayImage-DesignQA.jsx
Last active August 30, 2021 09:22
This helps visualize differences between the final design and the website/app you're working on. It's faster and requires less code than setting up a visual diff tool. It eliminates the need to constantly switch to the design file to check dimensions and other parameters.
// Check first comment for instructions and assumptions.
import design from "img/design.png";
const Homepage = () => {
return (
<>
<otherHomepageComponents />
<img
src={design}
@tripolskypetr
tripolskypetr / svg-with-color.html
Last active December 21, 2022 00:28
SVG with color (modern way) https://jsfiddle.net/g7j6v4L8/
<html>
<head>
<title>SVG with color</title>
</head>
<body>
<script>
(function () {
const createSvg = (color = '#ff9933') => `
@jakecobley
jakecobley / .eslintignore
Last active April 4, 2023 08:50
ESLint configuration extending Airbnb's and VueJS's configurations (targeting JavaScript and VueJS files).
################################################################################
# Node
################################################################################
node_modules
################################################################################
# Compiled Directories & Files
################################################################################
@sebmarkbage
sebmarkbage / Infrastructure.js
Last active May 2, 2024 03:11
SynchronousAsync.js
let cache = new Map();
let pending = new Map();
function fetchTextSync(url) {
if (cache.has(url)) {
return cache.get(url);
}
if (pending.has(url)) {
throw pending.get(url);
}
@acamino
acamino / README.md
Last active May 1, 2024 06:25
Shortcuts to Improve Your Bash & Zsh Productivity

Shortcut — Action

  • CTRL + A — Move to the beginning of the line
  • CTRL + E — Move to the end of the line
  • CTRL + [left arrow] — Move one word backward (on some systems this is ALT + B)
  • CTRL + [right arrow] — Move one word forward (on some systems this is ALT + F)
  • CTRL + U — (bash) Clear the characters on the line before the current cursor position
  • CTRL + U —(zsh) If you're using the zsh, this will clear the entire line
  • CTRL + K — Clear the characters on the line after the current cursor position
  • ESC + [backspace] — Delete the word in front of the cursor
@rxaviers
rxaviers / gist:7360908
Last active May 6, 2024 17:53
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue: