Skip to content

Instantly share code, notes, and snippets.

Avatar

Fabien tunguskha

View GitHub Profile
@danharper
danharper / background.js
Last active Apr 14, 2021
Bare minimum Chrome extension to inject a JS file into the given page when you click on the browser action icon. The script then inserts a new div into the DOM.
View background.js
// this is the background code...
// listen for our browerAction to be clicked
chrome.browserAction.onClicked.addListener(function (tab) {
// for the current tab, inject the "inject.js" file & execute it
chrome.tabs.executeScript(tab.ib, {
file: 'inject.js'
});
});
@rxaviers
rxaviers / gist:7360908
Last active Apr 14, 2021
Complete list of github markdown emoji markup
View gist:7360908

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:
View minimal-analytics-snippet.js
(function (context, trackingId, options) {
const history = context.history;
const doc = document;
const nav = navigator || {};
const storage = localStorage;
const encode = encodeURIComponent;
const pushState = history.pushState;
const typeException = 'exception';
const generateId = () => Math.random().toString(36);
const getId = () => {
View Gradient shadow in pure CSS.md

Gradient shadow in pure CSS

alt text

HTML
<button>Let's Go !</button>
@tomhicks
tomhicks / plink-plonk.js
Last active Mar 20, 2021
Listen to your web pages
View plink-plonk.js
@guillermorangel
guillermorangel / link_to_active_class.erb
Created Sep 18, 2013
Extend link helper, link_to, to add "active" class if link url is to current page. https://github.com/middleman/middleman/issues/303
View link_to_active_class.erb
@tunguskha
tunguskha / How to couple Sass and CSS Variables.md
Last active Mar 19, 2019
How to couple Sass and CSS Var
View How to couple Sass and CSS Variables.md

How to couple Sass and CSS Var

If you use Sass extension, you can work with CSS variables.

First, let's create our css variable.

\:root
  --MyColor: #5966D2