Skip to content

Instantly share code, notes, and snippets.

View fehmi's full-sized avatar
🏠
Working from home

Fehmi Özüseven fehmi

🏠
Working from home
View GitHub Profile
@fehmi
fehmi / store.ts
Created August 18, 2023 16:33 — forked from koenbok/store.ts
import * as React from "react";
/**
A hook to simply use state between components
Warning: this only works with function components (like any hook)
Usage:
// You can put this in an central file and import it too
const useStore = createStore({ count: 0 })
@fehmi
fehmi / Google Image Resize Proxy
Created May 17, 2023 17:45 — forked from nblenke/Google Image Resize Proxy
Use Google's Image caching/optimization proxy to resize an image
(function () {
var img = document.createElement('img');
path = encodeURIComponent('https://s3.amazonaws.com/llama0/burningfiremonkey.gif'),
width = 600,
refresh = 2592000;
img.src = 'https://images1-focus-opensocial.googleusercontent.com/gadgets/proxy?url=' + path + '&resize_w=' + width + '&container=focus&refresh=' + refresh;
document.body.appendChild(img);
}());
@fehmi
fehmi / webkit-pseudo-elements.md
Created May 15, 2020 14:53 — forked from leostratus/webkit-pseudo-elements.md
Webkit Pseudo-Element Selectors (Shadow DOM Elements)

An ongoing project to catalogue all of these sneaky, hidden, bleeding edge selectors as I prepare my JSConf EU 2012 talk.

Everything is broken up by tag, but within each the selectors aren't particularly ordered.

I have not tested/verified all of these. Have I missed some or got it wrong? Let me know. - A

A friendly reminder that you may need to set this property on your target/selected element to get the styling results you want:

-webkit-appearance:none;