Skip to content

Instantly share code, notes, and snippets.

View Vesely's full-sized avatar

David Veselý Vesely

View GitHub Profile
@Vesely
Vesely / gist:6f97abd4126508dd4c58cc2df9b3787d
Last active October 25, 2021 08:45
TypeError: Cannot read property 'split' of undefined

Error: TypeError: Cannot read property 'split' of undefined

Solution: Change npm depencency nuxt-svg to @nuxtjs/svg

@Vesely
Vesely / zapati
Created May 11, 2020 17:03
Shoptet - přesměrování zákazníka do košíku po přidání položky do košíku
<script>
var redirectToCard = function() {
if (!document.body.classList.contains('ajax-pending')) {
setTimeout(function() {
window.location.href = '/kosik/';
}, 500);
} else {
setTimeout(redirectToCard, 500);
}
};
@Vesely
Vesely / zeit-now-vercel-dns-g-suite-setup.md
Last active November 21, 2020 17:27 — forked from jaydenseric/zeit-now-g-suite-setup.md
Zeit Now Vercel DNS: G Suite and Improve MX setup

Run each of the following lines, replacing yourdomain.com and codehere with your details:

now dns add yourdomain.com @ TXT google-site-verification=codehere
now dns add yourdomain.com @ MX ASPMX.L.GOOGLE.COM 1
now dns add yourdomain.com @ MX ALT1.ASPMX.L.GOOGLE.COM 5
now dns add yourdomain.com @ MX ALT2.ASPMX.L.GOOGLE.COM 5
now dns add yourdomain.com @ MX ALT3.ASPMX.L.GOOGLE.COM 10
now dns add yourdomain.com @ MX ALT4.ASPMX.L.GOOGLE.COM 10
@Vesely
Vesely / .editorconfig
Created November 1, 2018 19:31
.editorconfig
root = true
[*]
indent_style = space
indent_size = 2
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
end_of_line = lf
# editorconfig-tools is unable to ignore longs strings or urls
@Vesely
Vesely / bookmark.js
Last active September 6, 2018 14:45
Trello - Get last ID
window.liff = window.liff || {};
window.liff.calcLastId = () => {
if (!document.querySelector('.js-last-id')) {
const headerBtns = document.querySelector('.board-header-btns.mod-left');
if (headerBtns) {
const lastIdElement = document.createElement("div");
lastIdElement.className = "js-last-id board-header-btn";
headerBtns.appendChild(lastIdElement);
} else {
@Vesely
Vesely / scroll-to.js
Created September 8, 2017 12:48
Stroll To Y (vanilla js)
/*
* Scroll To
*/
// first add raf shim
// http://www.paulirish.com/2011/requestanimationframe-for-smart-animating/
window.requestAnimFrame = (function(){
return window.requestAnimationFrame ||
window.webkitRequestAnimationFrame ||
window.mozRequestAnimationFrame ||
function( callback ){
Duplikace:
git clone --bare https://github.com/vaadin/vaadin-upload.git
cd public-repo.git
git push --mirror https://github.com/liffstudio/vaadin-upload.git
Přidání modulu:
git submodule add https://github.com/liffstudio/vaadin-upload.git vaadin-upload
@Vesely
Vesely / gist:b28f33dab0b0c389d0feede54b71f721
Created November 13, 2016 13:29
Marge a git branch to master
git checkout master
git pull origin master
git merge TEST
git push origin master
@Vesely
Vesely / async-google-analytics.html
Last active July 1, 2018 14:43
Async google analytics
<!-- Google Analytics -->
<script>
window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
ga('create', 'UA-XXXXX-Y', 'auto');
ga('send', 'pageview');
</script>
<script async src='https://www.google-analytics.com/analytics.js'></script>
<!-- End Google Analytics -->
@Vesely
Vesely / media-queries-breakpoints.css
Created July 13, 2016 15:21
My css breakpoints (media queries)
@media (max-width: 1240px) {
}
@media (max-width: 960px) {
}
@media (max-width: 880px) {