// Find last instance on line of ,
.,+5s/,\(.*,\)\@!.*/)/
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 moveFieldsBetweenStructures({ | |
sourceStructureId, | |
targetStructureId, | |
fieldIds | |
}) { | |
return (dispatch, getState) => { | |
const state = getState(); | |
const fieldsToMove = selectStructureFieldsByIds( | |
sourceStructureId, |
grep -E -l "(componentWillReceiveProps|componentWillMount|componentWillUpdate)" app/webapp/node_modules/**/*.js | wc -l
grep -E --color "(componentWillReceiveProps|componentWillMount|componentWillUpdate)" app/webapp/node_modules/**/*.js
truncate -s 0 $(grep -l "husky" ./*)
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 { Subscribe } from 'unstated' | |
import TodosContainer from '../../containers/todos' | |
class Todos extends Component { | |
constructor() { | |
super() | |
this.state = { newTodo: '' } | |
} |
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 { Container } from 'unstated' | |
class TodosContainer extends Container { | |
state = { | |
todos: [] | |
} | |
addTodo(todo) { | |
this.setState({ todos: [ ...this.state.todos, todo ] }) | |
} |
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' | |
class Todos extends Component { | |
constructor() { | |
super() | |
this.state = { newTodo: '' } | |
} | |
addTodoAndClearNewTodo() { | |
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
0x62F557F5A81879185A972DCFDfC9E61f5Ab03212 |
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
bot.on('message', (payload, reply) => { | |
const message = payload.message.text | |
const senderId = payload.sender.id | |
const apiUrl = 'https://newsapi.org/v1/articles?source=hacker-news&sortBy=top&apiKey=52a36d98da214f98a9b9b9bfaba502a7' | |
if (message === 'news' || message === 'News') { | |
request | |
.get(apiUrl) | |
.end((error, result) => { | |
const articles = result.body.articles |
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 users = {} | |
bot.on(‘postback’, (payload) => { | |
if (payload.postback.payload === ‘GET_STARTED_PAYLOAD’) { | |
const senderId = payload.sender.id | |
bot.getProfile(senderId, (error, profile) => { | |
if (error) { | |
console.log(error) | |
} |
NewerOlder