This file contains 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
kubectl describe pod -n kube-system calico-node-mzd5x | |
Name: calico-node-mzd5x | |
Namespace: kube-system | |
Priority: 2000001000 | |
Priority Class Name: system-node-critical | |
Node: node01/10.0.0.3 | |
Start Time: Mon, 20 Dec 2021 23:08:40 +0000 | |
Labels: controller-revision-hash=56dbff76cd | |
k8s-app=calico-node | |
pod-template-generation=2 |
This file contains 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 ManualStateComponent extends Component { | |
state = { | |
now: null | |
} | |
constructor(props) { | |
super(props) | |
} |
This file contains 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
# include <iostream> | |
using namespace std; | |
int main () | |
{ | |
// It is good practice to define variables at the top of the file when possible | |
const int dollar {100}; | |
const int quarter {25}; |
This file contains 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 from 'react' | |
import { addEventListener } from 'consolidated-events' | |
interface Props { | |
onOutsideClick: any | |
} | |
export default class OutsideClickHandler extends React.Component<Props> { | |
childNode: any | |
removeMouseDown: any |
This file contains 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 Middleware extends Component { | |
constructor(props) { | |
super(props) | |
this._process() | |
} | |
_process() { | |
const req = // something from browser and props to provide a convention for request information |
This file contains 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 {Route, Redirect} from 'react-router-dom' | |
import userProvider from 'store/providers/user' | |
export default class ProtectedRoute extends Component { | |
constructor(props) { | |
super(props) | |
this.inProgress = false |
This file contains 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 {connect} from 'react-redux' | |
export default function onConnect(keys) { | |
const mapStateToProps = (state) => { | |
const o = {} | |
for(let i = 0, l = keys.length; i < l; i++) { | |
const key = keys[i] |
This file contains 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 matchNodes(text) { | |
try { | |
const filter = { | |
acceptNode: function(node){ | |
if(node.nodeValue.toLowerCase().includes(text)){ | |
return NodeFilter.FILTER_ACCEPT | |
} |
This file contains 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 convertTo(type, data) { | |
switch(type) { | |
case 'hex': | |
case 'string': | |
return Buffer.from(data).toString('hex') | |
case 'buffer': | |
case 'Uint8Array': | |
return Buffer.from(data, 'hex') | |
} |
This file contains 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
// start.js | |
import React from 'react' | |
import ReactDOM from 'react-dom' | |
import { hot } from 'react-hot-loader' | |
const App = () => <div>Hello World!! 4</div> | |
const HotApp = hot(module)(App) | |
ReactDOM.render(<HotApp />, document.getElementById('root')) |
NewerOlder