Skip to content

Instantly share code, notes, and snippets.

🌈
🧐

Yoksel yoksel

🌈
🧐
Block or report user

Report or block yoksel

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@yoksel
yoksel / adv-screens.js
Last active Jan 24, 2019
Shows screens borders for detecting screens for displaying mobile banners
View adv-screens.js
// ==UserScript==
// @name Adv Screens
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://www.livejournal.com/*
// @match https://www.lj-13.dev.lj.rambler.tech/*
// @grant none
// ==/UserScript==
@yoksel
yoksel / urls-to-links.js
Last active Nov 10, 2018
Replace urls in plane text with clickable links
View urls-to-links.js
@yoksel
yoksel / showOutdatedDiff.js
Last active Oct 2, 2018
Bookmarklet. Show outdated diffs in GitHub pull requests
View showOutdatedDiff.js
javascript:{ let closedComments = document.querySelectorAll(".outdated-comment:not(.open) .js-toggle-outdated-comments"); closedComments.map = [].map; closedComments.map(item => { if(item.textContent.indexOf('resolved') < 0) { item.click(); }})}
View sublime preferences
{
"auto_complete_cycle": true,
"auto_find_in_selection": true,
"color_scheme": "Packages/User/SublimeLinter/Monokai (SL).tmTheme",
"draw_white_space": "all",
"ensure_newline_at_eof_on_save": true,
"font_face": "Droid Sans Mono for Powerline",
"font_size": 13,
"hayaku_CSS_prefixes_disable": true,
"highlight_line": true,
@yoksel
yoksel / LC_CTYPE.txt
Created Jun 8, 2018 — forked from ibrahimlawal/LC_CTYPE.txt
Centos warning: setlocale: LC_CTYPE: cannot change locale (UTF-8): No such file or directory
View LC_CTYPE.txt
vi /etc/environment
add these lines...
LANG=en_US.utf-8
LC_ALL=en_US.utf-8
@yoksel
yoksel / extend.js
Created Apr 8, 2018
extend.js для flow
View extend.js
// @flow
const hasOwnProperty = Object.prototype.hasOwnProperty;
const toString = Object.prototype.toString;
/**
* Проверяет, что переданный объект является "плоским" (т.е. созданным с помощью "{}"
* или "new Object").
*
* @param {Object} obj
@yoksel
yoksel / extend.js
Last active Apr 8, 2018
extend.js для typescript
View extend.js
const hasOwnProperty = Object.prototype.hasOwnProperty;
const objToString = Object.prototype.toString;
/**
* Проверяет, что переданный объект является "плоским" (т.е. созданным с помощью "{}"
* или "new Object").
*
* @param {Object} obj
* @returns {Boolean}
*/
@yoksel
yoksel / show-icons.js
Last active Sep 19, 2018
Bookmarklet for showing SVG icons existing on page
View show-icons.js
javascript:void(function(){ var doc = document; var body = doc.querySelector("body"); var head = doc.querySelector("head"); var icons = ""; var resultElem = doc.querySelector("#icons-shower"); if ( !resultElem ) { var styleElem = doc.createElement("style"); styleElem.setAttribute("id", "icons-styles"); styleElem.innerHTML += "UL {padding: 0;} LI {list-style: none;}"; styleElem.innerHTML += "#icons-shower {position: absolute; z-index: 5010; top: 0; right: 0; width: 500px; padding: 30px; background: white; border: 1px solid #DDD; box-shadow: 0 0 5px rgba(0,0,0,.5)}"; styleElem.innerHTML += ".icons-list__item {padding: 1em 0; border-bottom: 1px solid #DDD;}"; styleElem.innerHTML += ".icons-list__title {display: inline-block; margin: 0;}"; styleElem.innerHTML += ".svg-icon { float: right; width: 2em; height: 2em;}"; styleElem.innerHTML += ".icons-shower__title {margin-bottom: 1.5em}"; styleElem.innerHTML += ".icons-shower__close {float: right; cursor: pointer; font-size: 3em; line-height: 1;}"; head.appendChild(
View list.bh.js
module.exports = function(bh) {
bh.match('list', function (ctx) {
ctx.tag('ul');
ctx.content(
ctx.ctx.items.map(function (item) {
const items = ctx.ctx.items;
const block = ctx.ctx.mix.block;
let content = item.content;
You can’t perform that action at this time.