Skip to content

Instantly share code, notes, and snippets.

Daniel Fernandes danielpsf

  • Brazil
Block or report user

Report or block danielpsf

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@danielpsf
danielpsf / ElasticSearch_definitive_guide_notes.md
Last active Jun 10, 2019
ElasticSearch Definitive Guide's notes
View ElasticSearch_definitive_guide_notes.md

Elastic Search’s definitive guide notes

Chapter 1. You know, for search

  • RESTful web service on top of Apache Lucene
  • Has many clients that either uses TrasportClientor HTTP Clients
    • TransportClientis scheduled to be removed on ElasticSearch 8.0
  • Has two kind of query mechanisms
@danielpsf
danielpsf / devops_questions_1.md
Last active Apr 30, 2019
A devops small set of questions to be used on interviews
View devops_questions_1.md

DevOps questions to be asked

Please describe how would you do the deploy of the items below in terms of technologies and deployment (CICD):

  • Deploy a high available Application using EC2
  • Deploy a SPA
@danielpsf
danielpsf / devsecops_challenge_1.md
Last active Apr 30, 2019
A devops small challenge to be used on interviews
View devsecops_challenge_1.md

AWS Security monitoring and alert

After a technical interview where the candidate will have the oportunity to go over these topics this challenge can be used to assess the automation and coding skills as well as the AWS knowledge of a candidate.

Assumptions

  • Although documentation is not mandatory for this challenge it still is quite important
  • Any automation tool can be used, so feel free to use whatever you are most comfortable with, bash script included
  • Although our main development languages are Python and Go, feel free to pick whatever you are most comfortable with
@danielpsf
danielpsf / potatoes.py
Created Aug 24, 2018
Simple way of using multiple parameters in Python using argparse
View potatoes.py
import argparse
parser = argparse.ArgumentParser()
parser.add_argument(
'--potatoes', '-p',
nargs='*',
type=str,
required=True,
help='Type of potatoes that you like most'
@danielpsf
danielpsf / SassMeister-input.scss
Created Aug 5, 2015
Generated by SassMeister.com.
View SassMeister-input.scss
// ----
// libsass (v3.2.5)
// ----
//Variables
$default-font-color: red;
$default-width: 10px;
$title-font-color: blue;
//Mixins (functions)
@danielpsf
danielpsf / specHelper.js
Created Mar 6, 2014
This is my jasmine spec helper
View specHelper.js
'use strict';
beforeEach(function() {
this.addMatchers({
toEqualData: function(expected) {
this.message = function () {
var notText = this.isNot ? " not" : "";
return "Expected " + JSON.stringify(this.actual) + notText + " to be equals that " + JSON.stringify(expected);
}
return JSON.stringify(this.actual) === JSON.stringify(expected);
@danielpsf
danielpsf / app.js
Last active Aug 29, 2015
Just to understand more about binding an event watch to some element into a directive. you can see here: http://jsbin.com/EluKodAC/3
View app.js
angular.module('myApp', [])
.controller('myCtrl', ['$scope', function($scope) {
$scope.MyProccessedData = "";
}])
.directive('myDirective', [function(){
return function(scope, element, attrs) {
element.bind('keydown', function(event) {
scope.MyProccessedData = scope.$eval(attrs.ngModel);
});
};
@danielpsf
danielpsf / jsbin.Ozijuwi.html
Created Jan 9, 2014
This is a really simple way to get a formatted string from the database and put it into front end with AngularJS. You can see it working here: https://gist.github.com/danielpsf/8333968
View jsbin.Ozijuwi.html
<!DOCTYPE html>
<html>
<head>
<script src="http://cdnjs.cloudflare.com/ajax/libs/angular.js/1.2.1/angular.min.js"></script>
<meta charset=utf-8 />
<title>JS Bin</title>
</head>
<body ng-app="myApp" ng-controller="myController">
<div my-directive>
@danielpsf
danielpsf / jsbin.ULIFOwI.css
Created Sep 25, 2013
How to call directives inside controllers (AngularJS). Run code here -> http://jsbin.com/ULIFOwI/3/
View jsbin.ULIFOwI.css
.red {
color : red !important;
}
.blue {
color : blue !important;
}
You can’t perform that action at this time.