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
{ | |
"suggest.noselect": false, | |
"coc.preferences.formatOnSaveFiletypes": [ | |
"javascript", | |
"typescript", | |
"typescriptreact", | |
"json", | |
"javascriptreact", | |
"typescript.tsx", | |
"graphql" |
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
# Clean, simple, compatible and meaningful. | |
# Tested on Linux, Unix and Windows under ANSI colors. | |
# It is recommended to use with a dark background and the font Inconsolata. | |
# Colors: black, red, green, yellow, *blue, magenta, cyan, and white. | |
# Directory info. | |
local current_dir='${PWD/#$HOME/~}' | |
# VCS | |
YS_VCS_PROMPT_PREFIX1=" %{$fg[white]%}on%{$reset_color%} " |
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
class Message extends PureComponent { | |
render() { | |
return <li style={{ margin: "10px" }}> {this.props.message} </li> | |
} | |
} |
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
class Message extends Component { | |
shouldComponentUpdate(nextProps) { | |
if (this.props.message === nextProps.message) { | |
return false | |
} | |
return true | |
} | |
render() { |
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" | |
export default class App extends Component { | |
constructor() { | |
super() | |
this.state = { messages: [] } | |
// binds | |
this._getLastMessage = this._getLastMessage.bind(this) | |
this._onMessageChange = this._onMessageChange.bind(this) |
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, PureComponent } from "react" | |
export default class App extends Component { | |
constructor() { | |
super() | |
this.state = { messages: [] } | |
// binds | |
this._getLastMessage = this._getLastMessage.bind(this) | |
this._onMessageChange = this._onMessageChange.bind(this) |
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
# Place these in your ZSH or BASH config | |
# Other | |
alias please='sudo $(fc -ln -1)' # runs the previous command with `sudo` | |
# Editors | |
alias c="code ." # open the current directory in vscode | |
alias v="vim" # vim shortcut | |
# npm | |
alias nr="npm run " # npm run shortcut |
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
// **************** | |
// Reducer Imports | |
// **************** | |
import { | |
// users | |
DELETEUSER, | |
UPDATEUSER, | |
ADDUSER, | |
ADDUSERS | |
} from "./reducers/index.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
<?php | |
if(!function_exists('el_crypto_hmacSHA1')){ | |
/** | |
* Calculate the HMAC SHA1 hash of a string. | |
* | |
* @param string $key The key to hash against | |
* @param string $data The data to hash | |
* @param int $blocksize Optional blocksize | |
* @return string HMAC SHA1 |
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
j |