Skip to content

Instantly share code, notes, and snippets.


Kevin Hooke kevinhooke

View GitHub Profile
kevinhooke / gist:441c8c0651b7cc26bb599897cadeb5e9
Created Aug 8, 2020
Confluent Connector error: org.apache.kafka.connect.errors.DataException xyz is not a valid field name
View gist:441c8c0651b7cc26bb599897cadeb5e9
For a timestamp based connector, column xyz must be in the outer select
kevinhooke / gist:483a4fd4fe30fa9af1528a9454df2b7e
Created Jul 20, 2020 for javascript test code coverage (e.g. from 'jest --coverage')
View gist:483a4fd4fe30fa9af1528a9454df2b7e
#configure to point to the output file
View gist:db2d6ad9ba1d4b04bb8e6d48b138af53
function doesArrayContain(value){
let example = [ 'a', 'b', 'c'];
console.log('array contains value: ' + value);
kevinhooke / gist:fc53d4e9bee43398ce5325cb63de9e6d
Created May 13, 2020
~/.ssh/config - use to configure which ssh key is used with which git repo host
View gist:fc53d4e9bee43398ce5325cb63de9e6d
user youruserid
identityfile ~/.ssh/which-private-rsa-key
kevinhooke / gist:9e42b4df159bee5deb782c7fd2b94dea
Created Apr 22, 2020
react redux : use connect() with mapStateToProps to pass state into Components as props
View gist:9e42b4df159bee5deb782c7fd2b94dea
import React, { Component } from 'react';
import {connect} from 'react-redux';
class YourComponent extends Component {
render() {
kevinhooke / gist:44a460a5ad6fea6ef84d5821f4b8a1a7
Created Apr 22, 2020
react redux : use <Provider> to make store available to components
View gist:44a460a5ad6fea6ef84d5821f4b8a1a7
import React from 'react';
import { render } from 'react-dom';
import { Provider } from 'react-redux';
import store from './stores/Store';
import App from './App';
<Provider store={store}>
<App />
kevinhooke / gist:4edf5c6b6afda2ad4c79cc2d67d643a5
Created Apr 22, 2020
react redux : create store with devtools extension
View gist:4edf5c6b6afda2ad4c79cc2d67d643a5
import {createStore} from 'redux';
import yourReducer from '../reducers/yourReducer';
import { composeWithDevTools } from 'redux-devtools-extension'
const store = createStore(yourReducer, composeWithDevTools());
export default store;
View gist:c1ee4875805314eb5c781d82b5b890d7
$node example.js a b c
['node', //0
'example.js', //1
'a', //2
'b', //3
'c'] //4
kevinhooke / gist:613bd956a59faa8b1500f742a4c668e8
Created Mar 28, 2020
Oracle create user, grant permissions, assign tablespace
View gist:613bd956a59faa8b1500f742a4c668e8
create user example identified by "password";
grant connect to example; --logon
grant select, insert, update, delete on tablename to test;
grant create table to example;
-- without assigning tablespace you get this error:
ORA-01950: no privileges on tablespace 'USERS'
alter user example quota unlimited on users;
You can’t perform that action at this time.