Skip to content

Instantly share code, notes, and snippets.

View koekaverna's full-sized avatar
:octocat:
Ready to participate 👨‍💻

Egor koekaverna

:octocat:
Ready to participate 👨‍💻
  • Limassol, Cyprus
View GitHub Profile
@koekaverna
koekaverna / thinced.js
Created April 2, 2017 09:48 — forked from varmais/thinced.js
Geolocation to Promise wrap example
var getPosition = function (options) {
return new Promise(function (resolve, reject) {
navigator.geolocation.getCurrentPosition(resolve, reject, options);
});
}
getPosition()
.then((position) => {
console.log(position);
})
@koekaverna
koekaverna / KeepUTMRedirect.php
Last active February 18, 2020 13:22
Laravel middleware that keeps utm marks while redirect
<?php
// This middleware save utm query from url while redirect
// It's require Spatie\Url (https://github.com/spatie/url)
namespace App\Http\Middleware;
use Closure;
use Spatie\Url\Url;
class KeepUTMRedirect
<template>
<canvas ref="canvas" width="400" height="400" class="mt-5"></canvas>
</template>
<script>
import * as sleep from 'await-sleep'
const ITEM_TYPES = [
{ icon: '🍎', boost: 1 },
{ icon: '🍖', boost: 2 },