This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$langlist = New-WinUserLanguageList en-US | |
$langlist.Add('uk') | |
$langlist[1].InputMethodTips.Clear() | |
# 0422:00020422 - Default Ukrainian | |
# 0422:A0000422 - Unicode 2.0 https://r2u.org.ua/wiki/keyboard/UkrainianUnicode | |
$langlist[1].InputMethodTips.Add('0422:A0000422') | |
Set-WinUserLanguageList $langlist -Force |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alert('It works') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function promisify(func, ...args) { | |
return (args) => { | |
return new Promise((resolve, reject) => { | |
func(args, (err, ...args) => { | |
if (err) { | |
return reject(err); | |
} | |
resolve(args); | |
}) | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let curHr = require('today').getHours(); | |
const greeting = new require('greeting')('@team'); | |
if(curHr<12){ | |
greeting.hello('morning'); | |
}else if(curHr<18){ | |
greeting.hello('afternoon'); | |
}else{ | |
greeting.hello('evening'); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Allow bold colors - necessary for some reason | |
attrcolor b ".I" | |
# Tell screen how to set colors. AB = background, AF=foreground | |
termcapinfo xterm 'Co#256:AB=\E[48;5;%dm:AF=\E[38;5;%dm' | |
# Enables use of shift-PgUp and shift-PgDn | |
termcapinfo xterm|xterms|xs|rxvt ti@:te@ | |
# Erase background with current bg color |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getPathTo(element) { | |
if (element.id!=='') | |
return 'id("'+element.id+'")'; | |
if (element===document.body) | |
return element.tagName; | |
var ix= 0; | |
var siblings= element.parentNode.childNodes; | |
for (var i= 0; i<siblings.length; i++) { | |
var sibling= siblings[i]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var dataset = function initDataSet() { | |
if (document.documentElement.dataset) { | |
return function native(el, prop, value) { | |
if (typeof value === 'undefined') { | |
return el.dataset[prop] = value; | |
} | |
else { | |
return el.dataset[prop]; | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<a href="javascript:(function()%7Bfunction addTab(text) %7Bvar li %3D document.createElement('li')%3Bvar c %3D new ZeroClipboard(li)%3Bc.on('copy'%2C function(e) %7Be.clipboardData.setData('text%2Fplain'%2C text)%3Bli.innerHTML %3D 'Notes <small><b>(copied)<b><%2Fsmall>'%3B%7D)%3Bli.classList.add('tabnav-tab')%3Bli.innerText %3D 'Copy Notes'%3Bli.style.cursor %3D 'pointer'%3Bdocument.querySelector('.tabnav-tabs').appendChild(li)%3B%7D%3Bfunction getNotes() %7Breturn Array.prototype.map.call(document.querySelectorAll('.comment-body > p')%2Cfunction(c) %7Breturn '%5C%5C' %2B c.innerHTML%3B%7D).join("%5Cn")%7D%3BaddTab(getNotes())%7D)()">Get Release Notes</a> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** @global ZeroClipboard **/ | |
function addTab(text) { | |
var li = document.createElement('li'); | |
var c = new ZeroClipboard(li); | |
c.on('copy', function(e) { | |
e.clipboardData.setData('text/plain', text); | |
li.innerHTML = 'Notes <small><b>(copied)<b></small>'; | |
}); | |
li.classList.add('tabnav-tab'); | |
li.innerText = 'Copy Notes'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** @global ZeroClipboard **/ | |
function addTab(text) { | |
var li = document.createElement('li'); | |
li.classList.add('tabnav-tab'); | |
li.innerText = 'Copy Notes'; | |
li.style.cursor = 'pointer'; | |
var c = new ZeroClipboard(li); | |
c.on('copy', function(e) { | |
e.clipboardData.setData('text/plain', text); | |
li.innerHTML = 'Notes <small><b>(copied)<b></small>'; |
NewerOlder