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
| export const namer = ({ | |
| length = 5, | |
| useDigit = true, | |
| useAlpha = true, | |
| upperOnly = false, | |
| lowerOnly = false, | |
| }) => { | |
| let str = []; | |
| let stock = []; |
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 { success, failed } = require("./services/responses"); | |
| const { VerifyToken } = require("./services/security"); | |
| exports.handler = async (event, context) => { | |
| context.callbackWaitsForEmptyEventLoop = false; | |
| const user = await VerifyToken(event.queryStringParameters.token); | |
| if (!user) return failed("unauthorized", 401); |
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 fetch = require("node-fetch"); | |
| const { api_url } = require("./config"); | |
| exports.sourceNodes = async ( | |
| { reporter, actions, createNodeId, createContentDigest }, | |
| options | |
| ) => { | |
| if (process.env.NODE_ENV == "development") { | |
| reporter.warn("Welcome to MYCustomer Plugin"); | |
| } |
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
| export const DELETE_ITEMS = payload => { | |
| return (dispatch, getState, api) => { | |
| api.delete(`items?ids=${payload}`) | |
| .then(() => { | |
| //dispatch(SUCCESS_NOTIFICATION()) | |
| }) | |
| .catch(err => { |
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 axios from 'axios' | |
| import {combineReducers, createStore, applyMiddleware} from 'redux' | |
| import thunk from 'redux-thunk' | |
| import listTodoReducer from './components/ListTodo/ListTodo.reducer' | |
| const API_ENDPOINT = "https://api...." | |
| //combine project reducers | |
| const reducers = combineReducers({ | |
| listTodoReducer |
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
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using System.Text; | |
| using System.Threading.Tasks; | |
| using System.Numerics; | |
| using System.Security.Cryptography; | |
| using Newtonsoft.Json; | |
| using Newtonsoft.Json.Linq; | |
| using System.Globalization; |
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
| #restart a process in a background Screen. | |
| ps aux | awk '/process_filename/ {print}' | awk '{print $2}' | xargs kill -SIGTERM | |
| echo "restarting process_filename.." | |
| screen -r <screen_id> -X stuff $"/path/to/process_filename -params=123\n" | |
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
| language: node_js | |
| node_js: | |
| - node | |
| cache: | |
| directories: | |
| - node_modules | |
| script: | |
| - yarn install | |
| - yarn test | |
| - yarn build |