Skip to content

Instantly share code, notes, and snippets.

🚴
Life is fine !

Rajib rajibahmed

🚴
Life is fine !
Block or report user

Report or block rajibahmed

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
@rajibahmed
rajibahmed / redux-most-example.js
Created Dec 29, 2019
Practicing redux most stuff
View redux-most-example.js
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";
@rajibahmed
rajibahmed / App.jsx
Created Dec 24, 2019
SAP with all react hooks
View App.jsx
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 => {
@rajibahmed
rajibahmed / slim-redux.js
Created May 13, 2018 — forked from gaearon/slim-redux.js
Redux without the sanity checks in a single file. Don't use this, use normal Redux. :-)
View slim-redux.js
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])) {
View agent.conf
input {
exec {
type => "dstat"
command => "dstat -cdngypms --nocolor 1 0"
interval => 13
}
exec {
type => "apache-benchmark"
View logstash-cert.sh
# 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
You can’t perform that action at this time.