Skip to content

Instantly share code, notes, and snippets.

View Vesely's full-sized avatar

David Veselý Vesely

View GitHub Profile
@Vesely
Vesely / font-awesome.sublime-completions
Created November 23, 2013 20:23
Sublime Text 2 - completions - Font Awesome 4.0.3
{
"scope": "source.latte, source.html",
"completions":
[
"fa-glass",
"fa-music",
"fa-search",
"fa-envelope-o",
@Vesely
Vesely / delphi-fuckcions.pas
Last active May 27, 2016 18:09
Delphi, užitečné funkce: Převody číselných soustav, prvočíslo, odstranění přebytečných mezer, faktoriál...
//*********
// Developed by David Veselý
// http://davidvesely.cz/
//*********
function cifernySoucet(cislo:integer):integer;
var cifra, soucet:integer;
begin
@Vesely
Vesely / .htaccess
Created March 7, 2016 20:05
Htaccess snippet - Změní root adresář do podsložky www (užitečné pro všechny weby na Nette)
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^$ /www/ [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !^/www/
RewriteRule ^(.*)$ /www/$1
</IfModule>
<script>
if (!document.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#Image", "1.1")) {
document.documentElement.className = "no-svg";
}
</script>
<script>
if (!document.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#Image", "1.1")) {
var imgs = document.getElementsByTagName('img');
var endsWithDotSvg = /.*\.svg$/
var i = 0;
var l = imgs.length;
for(; i != l; ++i) {
if(imgs[i].src.match(endsWithDotSvg)) {
imgs[i].src = imgs[i].src.slice(0, -3) + 'png';
}
git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
@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) {
@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 / 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
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