This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Create Key | |
openssl genrsa -des3 -out logstash.key 1024 | |
sudo openssl genrsa -des3 -out logstash.key 1024 | |
# Create CSR | |
openssl req -new -key logstash.key -out logstash.csr | |
sudo openssl req -new -key logstash.key -out logstash.csr | |
# Remove password from key | |
sudo openssl rsa -in logstash.key.org -out logstash.key | |
# Create certificate | |
sudo openssl x509 -req -days 365 -in logstash.csr -signkey server.key -out logstash.crt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
input { | |
exec { | |
type => "dstat" | |
command => "dstat -cdngypms --nocolor 1 0" | |
interval => 13 | |
} | |
exec { | |
type => "apache-benchmark" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function mapValues(obj, fn) { | |
return Object.keys(obj).reduce((result, key) => { | |
result[key] = fn(obj[key], key); | |
return result; | |
}, {}); | |
} | |
function pick(obj, fn) { | |
return Object.keys(obj).reduce((result, key) => { | |
if (fn(obj[key])) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { useState, useEffect, useContext, useReducer } from "react"; | |
const api = "https://randomuser.me/api/?results=2"; | |
const NEXT_PAGE = "NEXT_PAGE"; | |
const ThemeContext = React.createContext(null); | |
const Users = ({ users, children }) => { | |
const themeCxt = useContext(ThemeContext); | |
return users.map(user => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from "react"; | |
import { compose } from "ramda"; | |
import { createStore } from "redux"; | |
import { Provider, connect, useSelector } from "react-redux"; | |
import * as most from "most"; | |
import { | |
select, | |
createEpicMiddleware, | |
createStateStreamEnhancer | |
} from "redux-most"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const translations = { | |
en: { | |
searchLable: 'Add to', | |
addProduct: 'Add product', | |
menuHeader: 'MENU', | |
searchHeader: 'SEARCH', | |
}, | |
sv: { | |
searchLable: 'Lägg till vara', | |
addProduct: 'Lägg till', |