Skip to content

Instantly share code, notes, and snippets.

🤹‍♂
Code sweet code

Marcin Warpechowski warpech

Block or report user

Report or block warpech

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
@warpech
warpech / jQuery.md
Last active May 13, 2019
Web Components from the perspective of a jQuery developer
View jQuery.md

Web Components as successor to jQuery

This article is a homage to jQuery - a library that once was a great boost for the productiveness of thousands of web developers around the world. In the upcoming times, the benefit of using it will drop as web developers start to switch to the web standards, including Web Components.

Status quo

As of early 2014, current state of interactive web development heavily relies on established web standards - HTML, CSS and JavaScript, all of which have been subject to consistent iterative improvement during the last few years, with the support of all major web browser vendors.

As a report shows, 57.8% of all websites use JavaScript, of which stunning 93.2% use the jQuery library to enhance the development (source). There is a long tail of other libraries and micro frameworks that are being used instead, or in compliment to jQuery, but none of them has gotten close to the popularity of t

View index.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>Noop that returns</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script>
<script src="./suite.js"></script>
</head>
<body>
<h1>Open the console to view the results</h1>
@warpech
warpech / Convert.cs
Last active Sep 18, 2018
Convert ObjectNo to ObjectId
View Convert.cs
using System;
using System.Linq;
//Usage examples:
//
//star Convert.cs 6513
//star Convert.cs Blx
//
//Warning: the output goes to Starcounter Administrator
@warpech
warpech / README.md
Created Nov 29, 2017
An initial list of common, general-purpose web UI patterns
View README.md
  1. Accordion. A list that can have a single item or multiple items expanded to show more detail.
  2. Alphabetic indices. Renders the characters in a culture’s alphabet in standard order (e.g., as a vertical or horizontal strip). If supplied with a set of strings, the UI will disable those characters which are not found as the initial character of any string.
  3. Async operation button. A button whose caption changes to reflect an operation in progress (e.g., changing from “Sign In” to “Signing In...”) until the operation completes.
  4. Auto-complete. A text input field that helps the user quickly enter strings from a known list.
  5. Auto-format. Applies a collection of heuristics for formatting text: adding smart quotes, converts double hyphens to endashes, etc.
  6. Auto-size text box. A text area that expands to contain its text.
  7. Backdrop. Shows a background region of non-interactive elements behind the region’s main contents.
  8. Blog. Shows some or all of the entries in the indicated RSS feed.
  9. Blog headlin
@warpech
warpech / README.md
Created Nov 24, 2017
Commit messages
View README.md

Commit Messages

Commit messages should say why you made a change, not what you changed.

A good commit message has the following:

  • explanation of the problem
  • explanation of the solution
  • reference to the relevant GitHub issue
@warpech
warpech / script.js
Last active Sep 21, 2017
Tampermonkey script to display GitHub labels in search results and Notifications page
View script.js
// ==UserScript==
// @name Show labels on GH
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://github.com/*
// @grant none
// ==/UserScript==
View gist:f6722f2dcb2e6b9b418ed835c632575a
<template>
<template is="dom-bind">
<starcounter-include view-model="{{model.currentPage}}">
</starcounter-include>
</template>
<palindrom-polymer-notifer></palindrom-polymer-notifer>
</template>
<template>
@warpech
warpech / Master.html
Last active Dec 22, 2016
Sexy accessible, styleable buttons using SVG
View Master.html
<link rel="import" href="/sys/polymer/polymer.html">
<link rel="import" href="/sys/paper-icon-button/paper-icon-button.html">
<link rel="import" href="/CompositionEditor/elements/compositioneditor-inserter/compositioneditor-inserter.html">
<template>
<style>
.CompositionEditor-resetbutton {
margin: 0;
padding: 0;
border: 0;
@warpech
warpech / Current.json
Created Apr 13, 2016
Current vs potential namespacing in JSON
View Current.json
{
"CurrentPage":{
"Launcher":{
"Html":""
},
"Products":{
"Html":""
}
}
}
@warpech
warpech / SentimentHelper.cs
Created Jan 3, 2016
Sentiment analysis that takes long time
View SentimentHelper.cs
using edu.stanford.nlp.ling;
using edu.stanford.nlp.neural.rnn;
using edu.stanford.nlp.pipeline;
using edu.stanford.nlp.sentiment;
using edu.stanford.nlp.trees;
using edu.stanford.nlp.util;
using java.io;
using java.text;
using java.util;
using Starcounter;
You can’t perform that action at this time.