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
// my sync-settings
@maliMirkec
maliMirkec / .bashrc
Last active December 7, 2016 13:37
My bash shortcuts
# add git flow completion shortcuts
source ~/git-flow-completion.bash
# reload source
alias brc="source ~/.bashrc"
# open explorer in current folder
alias e.="explorer ."
# git: log pretty
@maliMirkec
maliMirkec / .bash
Created August 26, 2016 05:55
Add nginx signing key
// get nginx key
curl -O https://nginx.org/keys/nginx_signing.key
// install
apt-key add nginx_signing.key
@maliMirkec
maliMirkec / tabs.html
Last active October 6, 2016 17:35
CSS tabs HTML structure
<!-- main wrapper -->
<div class="tabs">
<!-- radio block will be hidden, but will be used to control the tabs -->
<input class="tabs__radio" id="myTab1" type="radio" name="myTabs" value="1">
<input class="tabs__radio" id="myTab2" type="radio" name="myTabs" value="2">
<input class="tabs__radio" id="myTab3" type="radio" name="myTabs" value="3">
...
<input class="tabs__radio" id="myTab10" type="radio" name="myTabs" value="10">
<!-- labels will be display as actual tabs -->
@maliMirkec
maliMirkec / tabs.scss
Created October 6, 2016 16:24
CSS tabs style
// import cita-flex mixins
@import './bower_components/cita-flex/css/src/_cita-flex-mixins.scss';
//default variables
$size: .5rem;
$background: #e5e5e5;
$background--active: #fefefe;
$color: #4e4e4e;
$color--disabled: #8e8e8e;
$breakpoint: 600px;
@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
@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 / 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 / reset.css
Created February 7, 2017 13:18
Simple CSS reset
* {
padding: 0;
margin: 0;
box-sizing: border-box;
}
@maliMirkec
maliMirkec / locks.scss
Last active July 9, 2017 16:37
Document typography with css locks
@mixin css-locks($properties, $min-vw, $max-vw, $min-value, $max-value) {
@each $property in $properties {
#{$property}: $min-value;
}
@media screen and (min-width: $min-vw) {
@each $property in $properties {
#{$property}: calc(#{$min-value} + #{strip-unit($max-value - $min-value)} * (100vw - #{$min-vw}) / #{strip-unit($max-vw - $min-vw)});
}
}