Skip to content

Instantly share code, notes, and snippets.

View aginev's full-sized avatar
👽
Looking for new opportunities

Atanas Ginev aginev

👽
Looking for new opportunities
View GitHub Profile
@aginev
aginev / array_chunk_split.php
Created March 11, 2016 07:54
Split array into a specific number of chuncks
<?php
/**
* Split array into a specific number of chuncks
*
* @param array $data
* @param $chunks Number of chunks
* @return array
*/
function partition(Array $data, $chunks) {
$result = array();
@aginev
aginev / add-locale-ubuntu.md
Last active March 30, 2020 18:17
Add new locale at Ubuntu 16.04

First install the language pack

sudo apt-get install language-pack-bg

Add new locale

sudo locale-gen bg_BG
sudo locale-gen bg_BG.UTF-8
@aginev
aginev / user-aliases.cmd
Last active August 10, 2017 06:40
Cmder Aliases
;= @echo off
;= rem Call DOSKEY and use this file as the macrofile
;= %SystemRoot%\system32\doskey /listsize=1000 /macrofile=%0%
;= rem In batch mode, jump to the end of the file
;= goto:eof
;= Add aliases below here
e.=explorer .
pwd=cd
clear=cls
history=cat "%CMDER_ROOT%\config\.history"
@aginev
aginev / .bash_aliases
Last active July 19, 2018 11:12
Git for Windows Bash aliases. All should be placed at user home directory.
alias e='explorer'
alias e.='explorer .'
# Cleaer screen
alias c='clear'
# Navigate to Home
alias ~='cd ~'
# Navigate to Work
alias w='cd /d/htdocs/'
@aginev
aginev / self-signed-certificate.md
Last active February 15, 2021 09:58
Create self signed certificate under Ubuntu and add it to Nginx or Angular 10+

Create self signed certificate under Ubuntu and add it to Nginx or Angular 10+

1. Clone this helper repo for creating self signed SSL certificates

Change openssl-custom.cnf if you want to use custom domain other then localhost

git clone https://github.com/RubenVermeulen/generate-trusted-ssl-certificate.git
cd <PATH_TO_REPO_FOLDER>/generate-trusted-ssl-certificate
bash generate.sh