Skip to content

Instantly share code, notes, and snippets.

View kirilkirkov's full-sized avatar
🎯
Focusing

Kiril Kirkov kirilkirkov

🎯
Focusing
View GitHub Profile
@kirilkirkov
kirilkirkov / DER vs. CRT vs. CER vs. PEM Certificates and How To Convert Them
Created March 17, 2020 15:21
DER vs. CRT vs. CER vs. PEM Certificates and How To Convert Them
https://support.ssl.com/Knowledgebase/Article/View/19/0/der-vs-crt-vs-cer-vs-pem-certificates-and-how-to-convert-them
Certificates and Encodings
At its core an X.509 certificate is a digital document that has been encoded and/or digitally signed according to RFC 5280.
In fact, the term X.509 certificate usually refers to the IETF’s PKIX Certificate and CRL Profile of the X.509 v3 certificate standard, as specified in RFC 5280, commonly referred to as PKIX for Public Key Infrastructure (X.509).
X509 File Extensions
@kirilkirkov
kirilkirkov / PaginationModule.js
Last active January 30, 2020 11:47
JS Pagination Class Module for Vuejs Components
export default class Pagination {
constructor(vm, limit, total, page_param_name) {
this.vm = vm
this.limit = parseInt(limit)
this.total = parseInt(total)
this.page_param_name = page_param_name
this.setMaxPagesToShow(5)
this.setDefaultStyles()
<?php
$url = 'https://valkata.lulin';
$proxyList = ['186.47.82.6:41430', '43.240.5.1:31777', '202.166.201.65:23500'];
$browserAgents = [
'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.7) Gecko/20070914 Firefox/2.0.0.7',
'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36',
'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.121 Safari/537.36',
'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.157 Safari/537.36',
];
@kirilkirkov
kirilkirkov / install_GoDaddy_SSL
Created February 27, 2018 10:06
Installing GoDaddy SSL Certificate in an Ubuntu Server
There are a lot of guides out there that deals with this topic (installing ssl certificate)
but not much that are actually tailored for this pair, GoDaddy and Ubuntu. So hopefully today’s
article will be helpful for many people.
Elements
Basically in order to successfully install an SSL certificate you need the following things
CSR file
Private key
Certificate key
@kirilkirkov
kirilkirkov / Fix Ugly Fonts in Netbeans under Linux
Created February 13, 2018 20:45
Fix Ugly Fonts in Netbeans under Linux
To enable anti-aliased fonts just for Netbeans, add -J-Dawt.useSystemAAFontSettings=on to the end of the netbeans_default_options line in /usr/share/netbeans/etc/netbeans.conf e.g.:
netbeans_default_options="-J-client -J-Xss2m -J-Xms32m -J-XX:PermSize=32m -J-Dawt.useSystemAAFontSettings=on"
Alternatively, you can set this globally so that all AWT apps are affected, by setting the _JAVA_OPTIONS environment variable in your .bash_profile:
export _JAVA_OPTIONS='-Dawt.useSystemAAFontSettings=on -Dswing.aatext=true'
This also has Swing equivalent, using the swing.aatext preference. You'll have to log out and log back in for this to take effect.
@kirilkirkov
kirilkirkov / getbem.com
Created October 18, 2016 06:49
Какво е BEM / Methodology?
BEM (Block, Element, Modifier) е подход за web разработка с цел всички компоненти да бъдат разделени
на блокове така, че да могат да бъдат преизползвани в следващи проекти просто с копиране. Когато използваме BEM
методът на писане css кодът трябва да съдържа само класове, без ID-та или name атрибути.
Block:
Блоковете са css класове които държат едно цяло. Например:
<!-- `header` block -->
<header class="header">
<!-- Nested `logo` block -->
<div class="logo"></div>
@kirilkirkov
kirilkirkov / gist:1cbccaca6d3d0db4875746c6020b9fc9
Last active September 14, 2016 14:42
Какво е codeception и как се използва?
Какво е?
- Codeception е php фреймуърк за правене на тестове за правилното изпълнение на програми/сайтове/форми..тн..
Как се инсталира?
- Може да се инсталира лесно с composer като се следват инструкцийте в сайта на codeception:
http://codeception.com/quickstart
Какво се предлага?
- Системата предлага unit, functional и acceptance тестове
* acceptance tests: този тип тестове е за проверка на текстове които се изобразяват на браузъра след
@kirilkirkov
kirilkirkov / gist:ad4e12d0149c6ebaa42b74fd78bd6b08
Created September 14, 2016 12:18
PHP Magic methods - Getters and Setters
<?php
class MyClass {
private $firstField;
private $secondField;
public function __get($property) {
if (property_exists($this, $property)) {
return $this->$property;
}
}
@kirilkirkov
kirilkirkov / gist:c0db20da6c239578e593e278713e4f45
Last active September 14, 2016 12:13
What are NAMESPACES and how works?
Namespacing does for functions and classes what scope does for variables.
It allows you to use the same function or class name in different parts of the
same program without causing a name collision.
In simple terms, think of a namespace as a person's surname. If there are two people n
amed "John" you can use their surnames to tell them apart.
The Scenario
@kirilkirkov
kirilkirkov / gist:c43a5bdccd9a5c9124c77560ee2ffd04
Last active September 15, 2016 06:29
THIS in javascript, promises, deferred, soap, restful, async-sync load..
this:
Когато се извиква от функция
myFunction = function () {
console.log(this);
};
myFunction();
в този случей ще върне главния window обект
Когато се извиква вътре в обект е референция към съмия него.
var myObject = {