This file contains hidden or 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
| # Open file | |
| :e main.js | |
| # Mapping keys in Vim (here onPress => , + l) | |
| :map ,l :!node main.js<cr> |
This file contains hidden or 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
| .htaccess flag list | |
| - C (chained with next rule) | |
| - CO=cookie (set specified cookie) | |
| - E=var:value (set environment variable var to value) | |
| - F (forbidden - sends a 403 header to the user) | |
| - G (gone - no longer exists) | |
| - H=handler (set handler) | |
| - L (last - stop processing rules) | |
| Last rule: instructs the server to stop rewriting after the preceding directive is processed. |
This file contains hidden or 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
| // File: .storybook/config.js | |
| import { configure, addDecorator } from '@kadira/storybook'; | |
| import Theme from './../src/ui/theme'; | |
| import React from 'react'; | |
| import { ThemeProvider } from 'styled-components' | |
| function loadStories() { | |
| require('../stories'); | |
| } |
This file contains hidden or 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
| ssh -R 80:localhost:8080 ssh.localhost.run | |
| ssh -R 80:localhost:3000 serveo.net | |
| # Request multiple tunnels at once | |
| ssh -R 80:localhost:8888 -R 80:localhost:9999 serveo.net | |
| npm install -g localtunnel | |
| lt --port 8000 | |
| https://github.com/localtunnel/localtunnel | |
| https://www.pluralsight.com/guides/exposing-your-local-node-js-app-to-the-world |
This file contains hidden or 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 xPathToCss(xpath) { | |
| return xpath | |
| .replace(/\[(\d+?)\]/g, function(s,m1){ return '['+(m1-1)+']'; }) | |
| .replace(/\/{2}/g, '') | |
| .replace(/\/+/g, ' > ') | |
| .replace(/@/g, '') | |
| .replace(/\[(\d+)\]/g, ':eq($1)') | |
| .replace(/^\s+/, ''); | |
| } |
This file contains hidden or 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 path = require("path"); | |
| const webpack = require("webpack"); | |
| const MiniCssExtractPlugin = require("mini-css-extract-plugin"); | |
| const CompressionPlugin = require("compression-webpack-plugin"); | |
| const UglifyJsPlugin = require("uglifyjs-webpack-plugin"); | |
| const OptimizeCSSAssetsPlugin = require("optimize-css-assets-webpack-plugin"); | |
| module.exports = { | |
| entry: { | |
| admin: "./React/js/App/Modules/Admin/admin.js", |
This file contains hidden or 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
| var execSync = require('child_process').execSync; | |
| var cmd = execSync("echo 'hello world'", { stdio: [0, 1, 2] }); |
This file contains hidden or 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
| http://fontello.com/ |
This file contains hidden or 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
| ### Git autocomplete in terminal | |
| brew install git | |
| vi ~/.bash_profile | |
| ------------------------ | |
| if [ -f $(brew --prefix)/etc/bash_completion ]; then | |
| . $(brew --prefix)/etc/bash_completion | |
| fi | |
| if [ -f `brew --prefix`/etc/bash_completion.d/git-completion.bash ]; then | |
| . `brew --prefix`/etc/bash_completion.d/git-completion.bash |
This file contains hidden or 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, { Component } from 'react'; | |
| import { AgGridReact } from 'ag-grid-react'; | |
| import axios from 'axios'; | |
| import 'ag-grid/dist/styles/ag-grid.css'; | |
| import 'ag-grid/dist/styles/theme-fresh.css'; | |
| const dataSource = { | |
| //rowCount: null, // behave as infinite scroll | |
| getRows: function(params) { | |
| console.log(params); |