Skip to content

Instantly share code, notes, and snippets.

:octocat:
JavaScripting

Tomasz Jakut Comandeer

:octocat:
JavaScripting
Block or report user

Report or block Comandeer

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
@Comandeer
Comandeer / README.md
Last active Jun 29, 2019
Simple utility to update supported Node versions in a project
View README.md

update-node.js

Installation and usage

cd dir-with-cloned-update-node
npm i --no-save external-editor yaml
cd your-project
node path/to/update-node <min> <max> <branch>
View deep-clone-1.js
function deepClone( obj ) {
const clone = { ...obj };
Object.entries( clone ).forEach( ( [ key, value ] ) => {
if ( value && typeof value === 'object' ) {
clone[ key ] = deepClone( value );
}
} );
return clone;
View excel.html
<html xmlns:v="urn:schemas-microsoft-com:vml"
xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:x="urn:schemas-microsoft-com:office:excel"
xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=utf-8">
<meta name=ProgId content=Excel.Sheet>
<meta name=Generator content="Microsoft Excel 15">
<link id=Main-File rel=Main-File
@Comandeer
Comandeer / highlights.md
Last active Nov 15, 2018
Proposal for simplified API for range highlighting
View highlights.md

Proposal for simplified API for range highlighting

::highlight(example-highlight) {
    background-color: yellow;
    color: blue;
}
@Comandeer
Comandeer / link-feature.md
Last active Mar 8, 2016
Link features in the popular WYSIWYG editors.
View link-feature.md
@Comandeer
Comandeer / enter.md
Created Feb 26, 2016
WYSIWYG support for Enter key.
View enter.md
@Comandeer
Comandeer / research.md
Created Feb 26, 2016
Template for WYSIWYG research
View research.md
@Comandeer
Comandeer / areDeepEqual.js
Created Feb 16, 2016
YUITest.ObjectAssert.areDeepEqual method
View areDeepEqual.js
// Based on http://yuilibrary.com/yui/docs/api/files/test_js_ObjectAssert.js.html#l12.
YUITest.ObjectAssert.areDeepEqual = function( expected, actual, message ) {
var expectedKeys = YUITest.Object.keys(expected),
actualKeys = YUITest.Object.keys(actual),
areEqual = YUITest.ObjectAssert.areEqual;
YUITest.Assert._increment();
// First check keys array length.
if ( expectedKeys.length != actualKeys.length ) {
@Comandeer
Comandeer / basicFeatures.md
Created Dec 6, 2015
Basic features in various WYSIWYGs
View basicFeatures.md
View iife.js
var isLocalStorageSupported = (function()
{
try
{
localStorage.setItem('test', 'test');
localStorage.removeItem('test');
return true;
}
catch(e)
{
You can’t perform that action at this time.