Skip to content

Instantly share code, notes, and snippets.

@eddyLazar
eddyLazar / create-component.sh
Created July 4, 2019 10:33
create atomic design component
#!/bin/bash
echo $1
type=''
name=$2
if [ $1 = "a" ]; then
type="atoms"
fi
@eddyLazar
eddyLazar / docker-compose-gitlab-runner.yml
Last active May 31, 2019 13:42
register and Run GitLab runner with docker compose
version: '3'
services:
gitlab-runner:
image: gitlab/gitlab-runner:alpine
container_name: gitlab_runner
restart: always
depends_on:
- register-runner
volumes:
test('should rejects any error', async () => {
await expect(callPromise(arg1, arg2)).rejects.toEqual(
expect.any(Error)
);
});
@eddyLazar
eddyLazar / ReactBootstrapTable.jsx
Last active March 1, 2020 04:20
example of implementing wenzhixin bootstrap-table with react
import React from 'react'
import ReactDOM from 'react-dom'
const BootstrapTable = React.createClass({
componentDidMount() {
$(ReactDOM.findDOMNode(this)).bootstrapTable(this.props)
},
componentWillReceiveProps(nextProps) {
$(ReactDOM.findDOMNode(this)).bootstrapTable('refreshOptions', nextProps)
},
.FullVideoBg {
position: fixed;
top: 50%;
left: 50%;
min-width: 100%;
min-height: 100%;
width: auto;
height: auto;
z-index: -100;
-ms-transform: translateX(-50%) translateY(-50%);
// https://www.npmjs.com/package/request
var request = require('request')
var opts = { url: 'http://myjsonstorage.com/db.json', json: true }
request(opts, function (error, response, body) {
if (error) throw error
jsonServer.router(body)
//...
jsonServer.listen(3000)
})
@eddyLazar
eddyLazar / node-folder-structure-options.md
Created January 21, 2016 11:05 — forked from lancejpollard/node-folder-structure-options.md
What is your folder-structure preference for a large-scale Node.js project?

What is your folder-structure preference for a large-scale Node.js project?

0: Starting from Rails

This is the reference point. All the other options are based off this.

|-- app
|   |-- controllers
|   |   |-- admin
#user nobody;
worker_processes 1;
#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
#pid logs/nginx.pid;