Skip to content

Instantly share code, notes, and snippets.

View merih's full-sized avatar
🪐

Merih Akar merih

🪐
View GitHub Profile
@merih
merih / customizeES6CompatTable.js
Last active November 18, 2015 00:12
Hide unwanted browser columns from Kangax's ES6 compatibility table
javascript:(() => {
const userStyle = document.createElement("style");
document.head.appendChild(userStyle);
const userSheet = userStyle.sheet;
const hiddenBrowsers = [
"tr",
"babel",
"closure",
"jsx",
javascript:(function () {
document.getElementById("files").addEventListener("click", function (ev) {
if (ev.target.classList.contains("file-header")) {
ev.preventDefault();
var fileBody = ev.target.nextElementSibling;
if (fileBody.classList.contains("zpl-hidden")) {
fileBody.classList.remove("zpl-hidden");
fileBody.style.display = "block";
} else {
fileBody.classList.add("zpl-hidden");
@merih
merih / colorBugzilla.js
Last active August 29, 2015 14:13
Color bugzilla dependencies according to their statuses
javascript:(() => {
var s = document.createElement("style");
document.head.appendChild(s);
var ss = s.sheet;
ss.insertRule(`:root {
--blue: #007aff;
--red: #ff5500;
--yellow: #fecf33;
--orange: #f69833;
@merih
merih / SHA-256.js
Last active August 29, 2015 14:04
WebCrypto SHA-256 digest + TextEncoder/TextDecoder + Promises + Array.from + Arrow Functions
window.crypto.subtle.digest({
name: "SHA-256"
}, new TextEncoder().encode("Hello, World!"))
.then(x => console.log(Array.from(x).map(y => y.toString(16)).join("")));
(function () {
var i = document.querySelector("img"),
r = 0,
m = "<menu type='context' id='m'>" +
"<menuitem label='Rotate clockwise' id='rcw'></menuitem>" +
"<menuitem label='Rotate counter-clockwise' id='rccw'></menuitem>" +
"</menu>";
function rotateBy(d) {
r += d;
@merih
merih / vimrc
Last active August 29, 2015 13:56
set nu
set tabstop=4
set shiftwidth=4
set softtabstop=4
set smarttab
set smartindent
set expandtab
set hlsearch
filetype plugin indent on
@merih
merih / hgrc
Created January 28, 2014 14:30
[ui]
username = <insert_username>
verbose = True
[auth]
prefix = hg.<insert_your_company>.com/
username = <insert_username>
password = <insert_password>
schemes = http