Skip to content

Instantly share code, notes, and snippets.

View maliMirkec's full-sized avatar
🤘
I’m really good at this without realising how.

Silvestar Bistrović maliMirkec

🤘
I’m really good at this without realising how.
View GitHub Profile
@maliMirkec
maliMirkec / .bashrc
Created March 15, 2023 13:17
.bashrc
# reload source
alias brc="source ~/.config/fish/.bashrc"
# open explorer in current folder
alias e.="explorer ."
# git: log pretty
alias gl="git log --oneline --graph"
# git: status condensed
@maliMirkec
maliMirkec / solution_task001.js
Last active February 3, 2022 06:39
codility tasks
// you can write to stdout for debugging purposes, e.g.
// console.log('this is a debug message');
// 80%
function binary(N) {
var half = Math.floor(N / 2);
var r = (N % 2).toString();
if(N >= 2) {
@maliMirkec
maliMirkec / apache.conf
Last active January 25, 2021 11:03
Install Varnish on Vesta CP
<IfModule mpm_prefork_module>
StartServers 1
MinSpareServers 1
MaxSpareServers 3
MaxClients 6
MaxRequestsPerChild 0
</IfModule>
<IfModule mpm_worker_module>
StartServers 1
<h1>Reading List No.7</h1>
<h3><a href="http://mentor.silvestar.codes/reads#2020-06-01">The UI Development Mentoring Newsletter</a></h3>
<h5><strong>2020-06-01</strong></h5>
<ul>
<li>
<strong><a href="https://www.htmhell.dev/20-close-buttons/">HTMHell special: close buttons</a></strong>
<br />
@maliMirkec
maliMirkec / staticgen-archive.json
Created July 10, 2019 12:05
STATICGEN.COM DATA ARCHIVE
{"timestamp":1562760199686,"data":{"ace":[{"timestamp":1562760199686,"stars":36,"forks":6,"issues":0,"repo":"https://github.com/botanicus/ace"}],"acrylamid":[{"timestamp":1562760199686,"stars":288,"forks":42,"issues":45,"repo":"https://github.com/posativ/acrylamid"}],"adm-dev-kit":[{"timestamp":1562760199686,"stars":29,"forks":4,"issues":11,"repo":"https://github.com/iamfrntdv/adm-dev-kit"}],"amsf":[{"timestamp":1562760199686,"stars":218,"forks":117,"issues":6,"repo":"https://github.com/sparanoid/almace-scaffolding"}],"anodize":[{"timestamp":1562760199686,"stars":4,"forks":0,"issues":0,"repo":"https://github.com/sidmani/anodize"}],"antora":[{"timestamp":1562760199686,"followers":559,"stars":165,"forks":63,"issues":121,"repo":"https://gitlab.com/antora/antora"}],"antwar":[{"timestamp":1562760199686,"stars":461,"forks":32,"issues":8,"repo":"https://github.com/antwarjs/antwar"}],"asimov-static":[{"timestamp":1562760199686,"stars":4,"forks":3,"issues":0,"repo":"https://github.com/adamrenklint/asimov-static"}],"as
@maliMirkec
maliMirkec / replace-placeholders.js
Created March 29, 2017 15:22
JavaScript function for replacing template placeholders.
var t = function (s, d) {
for (var p in d)
s = s.replace(new RegExp('{' + p + '}', 'g'), d[p]);
return s;
};
// usage
t('<p>{label1}</p><p>{label2}</p>', {
label1: 'Value1'
})
@maliMirkec
maliMirkec / style.css
Created October 9, 2018 10:53
Making a website with Hugo style
:root {
--color-alpha: rgb(255, 64, 136);
--color-beta: rgb(0, 131, 192);
--color-gamma: rgb(51, 186, 145);
--color-delta: rgb(252, 216, 4);
--color-omega: #f8f9fa;
--color-text: #0a1922;
--lh: 1.6;
--fz: 16px;
}
@maliMirkec
maliMirkec / redis
Last active July 9, 2018 15:26
Step by step installation of VestaCP on Ubuntu 16.04 x64
// Redis installation for Ubuntu 16.04 with PHP7
// https://guides.wp-bullet.com/install-redis-object-cache-for-wordpress-php-7-on-ubuntu-16-04/
// https://www.digitalocean.com/community/tutorials/how-to-configure-redis-caching-to-speed-up-wordpress-on-ubuntu-14-04
apt-get update
apt install build-essential -y
cd /tmp
wget http://download.redis.io/redis-stable.tar.gz
tar xzf redis*
cd redis*
@maliMirkec
maliMirkec / documentation and installation
Last active February 2, 2018 19:08
Batch scripts for image optimization
http://www.tecmint.com/optimize-and-compress-jpeg-or-png-batch-images-linux-commandline/
https://blarg.co.uk/blog/recursively-optimize-png-files
# install jpegoptim
apt-get update
apt-get install jpegoptim
# install optipng
apt-get update
apt-get install optipng
@maliMirkec
maliMirkec / font.css
Last active December 17, 2017 08:16
We can utilize the text-rendering CSS property to allow us to choose quality over speed, as well as some vendor specific properties to make our font sharper. Note: These should work for Chrome, Safari, and Firefox on Mac.
// Source: https://www.leejamesrobinson.com/blog/how-stripe-designs-beautiful-websites/
body {
font-family: Camphor, Open Sans, Segoe UI, sans-serif;
text-rendering: optimizeLegibility;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}