Skip to content

Instantly share code, notes, and snippets.

@mlent
mlent / gist:60010ba2bb46c5bcad8af114d283c939
Last active September 28, 2022 09:46
open-links-in-new-tab.js
<script type="text/javascript">
jQuery(document).ready(function($){
$('a').each(function(){
const href = $(this).attr('href');
if (!href) {
return;
}
const isNotAnchor = href.indexOf('#') === -1;
const isNotInternalLink = href.indexOf('YOUR_WEBSITE_URL') !== 0 && href.indexOf('/') !== 0;
@mlent
mlent / .nginxconfig
Last active February 7, 2023 14:41 — forked from TedAvery/.nginxconfig
Yoast affiliate redirect for Affilimate
location /go/ {
rewrite ^/go/(.*)$ /go/index.php?id=$1 last;
}
@mlent
mlent / social-sharing-buttons.html
Last active February 24, 2023 08:22
Social sharing buttons
<ul>
<li>
<a href="https://twitter.com/share?text=TITLE OF YOUR POST via @YOUR_USERNAME&url=HTTPS://YOUR_WEBSITE.COM" onclick="window.open(this.href, 'twitter-share', 'width=550,height=235'); return false;">
Share on Twitter
</a>
</li>
<li>
<a href="https://news.ycombinator.com/submitlink?u=HTTP://YOUR_URL.COM&t=YOUR CONTENT" onclick="window.open(this.href, 'hn-share', 'width=550,height=350'); return false;">
Share on Hacker News
</a>

Web Team Definition of Done

Development

  1. Feature is developed
  2. Pure logic tested with unit tests
  3. Local tests (for ANY change) in at least 3 browsers
  4. Write skeleton for e2e tests to describe all possible behaviors -- implement the most important cases as possible.

Review

  1. Code is reviewed by your teammates
@mlent
mlent / untitled.md
Last active November 8, 2016 09:49
job_ad_input

Fullstack JavaScript Engineer

Description

Who we are

The people of SumUp have brought the best way to accept card payments to 15 countries so far, but we won’t stop there. Headquartered in London, SumUp's major offices are in Berlin, Sofia and São Paulo. The Berlin office alone comprises more than 100 people from 24 countries. We recently launched a brand new contactless device, which makes paying by card easier than ever before.

SumUp could be interesting for you as an engineer in part because we cover so many platforms: we have physical hardware (made right here in Berlin), our own proprietary payment processing platform, mobile apps on iOS and Android, SDKs and APIs supporting third-party integration, and of course (the main star, in this team's humble opinion) a merchant-facing web app.

@mlent
mlent / untitled.md
Last active February 15, 2017 13:55 — forked from anonymous/untitled
job_ad_input

Fullstack JavaScript Engineer

Who we are

More than 100 people from 24 countries have brought the best way to accept card payments to 15 countries so far, but we won’t stop there. SumUp is headquartered in Berlin, with major offices also in London, Sofia and São Paulo. We recently launched a brand new contactless device, which makes paying by card easier than ever before.

SumUp is interesting for you as an engineer in part because we cover so many platforms: we have physical hardware (made right here in Berlin), our own proprietary payment processing platform, mobile apps on iOS and Android, SDKs and APIs supporting third-party integration, and of course (the main star, in our humble opinion) a merchant-facing web app.

What we're looking for

function sendDataToAmazon(dataToSend) {
return getAmazonKey()
.then(getUrlWithKey)
.then(function(url) {
/* Sometimes it's easier to inline if you have
data passed into original function which is only
needed in the middle of a promise chain*/
return sendDataToUrl(url, dataToSend);
})
.then(updateUI);
<script>
var btn = document.getElementById('myButton');
btn.addEventListener('click', loadProgress);
function loadProgress() {
console.log('Button clicked!');
var progressBar = document.getElementsByClassName('progress-bar')[0];
var interval = 30;
var currentValue = 0;
for (var i = 0; i < 100; i += interval) {
var modules = require('modules');
var DIRECTIVE_NAME = 'validationList';
function validationList() {
return {
restrict: 'C',
link: function(scope, elem, attrs) {
var liExprs = [];
'use strict';
define(['jquery',
'angular',
'angularMocks',
'common/services/i18n',
'common/filters/i18n',
'text!util/templates/scroll_selector_template.html',
'util/directives/scroll_selector_directive',
'angulartics'],