Skip to content

Instantly share code, notes, and snippets.

View bang9's full-sized avatar
🥝

Hyungu Kang | Airen bang9

🥝
View GitHub Profile
@bang9
bang9 / PanResponder_Overview.js
Created March 25, 2021 09:13 — forked from teameh/PanResponder_Overview.js
React native PanResponder interface overview
this._panResponder = PanResponder.create({
// ----------- NEGOTIATION:
// A view can become the touch responder by implementing the correct negotiation methods.
// Should child views be prevented from becoming responder on first touch?
onStartShouldSetPanResponderCapture: (evt, gestureState) => () => {
console.info('onStartShouldSetPanResponderCapture');
return true;
},
@bang9
bang9 / nodeJSCustomPadding.js
Created July 28, 2020 01:08 — forked from silicakes/nodeJSCustomPadding.js
NodeJS Crypto custom padding example
// Following an answer I posted to my question here:
// http://stackoverflow.com/questions/21856892/node-crypto-aes256-cbc-0x0-padding-example/21858749#21858749
//I'm expecting a utf8 encoded string
function customPadding(str, blockSize, padder, format) {
str = new Buffer(str,"utf8").toString(format);
//1 char = 8bytes
var bitLength = str.length*8;