Skip to content

Instantly share code, notes, and snippets.

View Ron-Lavi's full-sized avatar

Ron Lavi Ron-Lavi

  • Red Hat Israel
  • Israel
View GitHub Profile
@Ron-Lavi
Ron-Lavi / Forklift_painfulness.txt
Last active April 4, 2019 13:23
Forklift painfulness
Installation:
- install also system sshfs for using reverse sshfs.
- vagrant-libvirt
- local yaml example:
centos7-devel:
primary: true
box: centos7
sshfs:
host_path: '/home/rlavi/Projects/theforeman/vagrant-shares/centos7-devel'
guest_path: '/home/vagrant'
@Ron-Lavi
Ron-Lavi / manual_deploy
Created February 19, 2019 14:44
Patternfly manual deploy
1. yarn build:storybook && cp -r .out .public/patternfly-3
2. yarn build:prdocs && cp -r packages/patternfly-4/react-docs/public .public/patternfly-4 && cp -r packages/patternfly-4/react-docs/public/assets .public/assets
3. yarn run surge --project .public --domain $DEPLOY_DOMAIN
export const fetchData = () => ({
path: '/data',
method: 'GET',
query: { srach: 'some-search' },
debounce: 300,
baseConst: 'AUTO_COMPLETE',
finalizeRespnse: (response) => response.data.myData
});
git checkout 83d7959b8a65cbd073c9721f72ca4f5713257a20
@Ron-Lavi
Ron-Lavi / before
Created August 11, 2019 14:04
foreman hosts page
<html lang="en" data-timezone="UTC" class="layout-pf layout-pf-fixed"><head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Hosts</title>
<meta name="description" content="">
<meta name="viewport" content="user-scalable=no, width=device-width, initial-scale=1.0, maximum-scale=1.0">
<link rel="shortcut icon" type="image/x-icon" href="/assets/favicon-3c4b227479d0b22ade7a9ad5483b48b6f14ed265befe5e29ffcc4fbb63cbcc1a.ico">
@Ron-Lavi
Ron-Lavi / gist:b6a6bcfb1e0fc16b7b0bf69a92fbd441
Created August 19, 2019 10:21
.rubocop-https---github-com-theforeman-foreman-blob-develop--rubocop-yml
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
@Ron-Lavi
Ron-Lavi / gist:7d2bd6953920f290acea89e06d456bdc
Created September 15, 2019 06:23
nvm centos installation
curl https://raw.githubusercontent.com/creationix/nvm/v0.34.0/install.sh | bash
@Ron-Lavi
Ron-Lavi / index.js
Created September 16, 2019 10:51
Multiple layouts with React Router v4 Raw
import React from "react"
import { Route, Switch } from "react-router-dom"
const AppRoute = ({ component: Component, layout: Layout, ...rest }) => (
<Route {...rest} render={props => (
<Layout>
<Component {...props} />
</Layout>
)} />
)
jest.mock('../../redux/API');
const combinedReducers = { notifications: notificationReducer, ...APIReducers };
const middlewares = [APIMiddleware]
const failResponse = { response: { status: 401 } };
const notificationProps = {
data: componentMountData,
};
describe('Notification integration test', () => {
it('should flow', () => {
// foreman-js
npm i
npm run build
// foreman
npm i
npm run foreman-js:link