Skip to content

Instantly share code, notes, and snippets.

View ReeMii's full-sized avatar

Remigiusz Loginow ReeMii

  • DCX @ Capgemini Deutschland
  • Munich, Germany
  • X @reemii76
View GitHub Profile
sudo /usr/share/elasticsearch/bin/elasticsearch-plugin remove repository-s3
sudo /usr/share/elasticsearch/bin/elasticsearch-plugin install repository-s3
sudo service elasticsearch restart
curl -X PUT "localhost:9200/2250-jobstream-dev/_mapping/job" -H 'Content-Type: application/json' -d'
{
"properties": {
"wp_id": {
"type": "text",
"fields": {
"raw": {
"type": "text",
"store": true
}
ls -dt * | tail -n +4 | xargs rm -rf
openssl req -newkey rsa:2048 -nodes -keyout domain.key -out domain.csr
openssl req -key server.key -new -out domain.csr
@ReeMii
ReeMii / Angular Lifecycle Hooks.md
Last active December 13, 2019 14:48
angular lifecycle hooks #angular

In Order

  1. constructor()
  2. ngOnChanges(changes: SimpleChanges) - It is called every time the data changes.
  3. ngOnInit() - it is called only once when the component is loaded into the DOM
  4. ngDoCheck() - whenever theere is a change detection
  5. ngAfterContentInit() - is called once external content is projected into component’s view and right after the first ngDoCheck() and occurs only once.
  6. ngAfterContentChecked() - called once after ngAfterContentInit() and everytime after ngDoCheck()
  7. ngAfterViewInit() - is called once after the component’s view/ child views are loaded and right after ngAfterContentChecked() and occurs only once.
  8. ngAfterViewChecked() - called once after ngAfterViewInit() and everytime after ngDoCheck()
@ReeMii
ReeMii / Angular Interview Questions.txt
Last active December 13, 2019 14:49
interview questions #angular
https://www.edureka.co/blog/interview-questions/top-angularjs-interview-questions-2016/
@ReeMii
ReeMii / Communication Patterns in Angular.md
Last active January 15, 2022 15:23
communications patterns in angular #angular

Angular follows a two-way data flow pattern, meaning you can send data up and down the component tree.

Everything in the Angular is a component.

Component basics

Interpolation

Interpolation is the way to inject some value into HTML. We are injecting title from the component class to the HTML.

@ReeMii
ReeMii / nl2br.js
Created July 31, 2015 13:39
nl2br
function nl2br(str, is_xhtml) {
// discuss at: http://phpjs.org/functions/nl2br/
// original by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
// improved by: Philip Peterson
// improved by: Onno Marsman
// improved by: Atli Þór
// improved by: Brett Zamir (http://brett-zamir.me)
// improved by: Maximusya
// bugfixed by: Onno Marsman
// bugfixed by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
@ReeMii
ReeMii / csr
Created July 13, 2015 15:23
Genrate SSL key and CSR
Generate a new private key and Certificate Signing Request
openssl req -out CSR.csr -new -newkey rsa:2048 -nodes -keyout privateKey.key
Generate a certificate signing request (CSR) for an existing private key
openssl req -out CSR.csr -key privateKey.key -new