Skip to content

Instantly share code, notes, and snippets.

View ccheney's full-sized avatar
🌎
💥🚀

Chris Cheney ccheney

🌎
💥🚀
View GitHub Profile
@ccheney
ccheney / hash-timestamp.js
Created October 26, 2017 15:51
generate hash+timestamp string & validate hash+timestamp string from userland
/**
* generate hash+timestamp string
* validate hash+timestamp string from userland
*/
const crypto = require('crypto');
const SECRET = ' ';
function _generateHash(isoDateString) {
return crypto
@ccheney
ccheney / tcplisteners
Last active February 27, 2018 02:44
see processes listening on what port
lsof -iTCP -sTCP:LISTEN -P
@ccheney
ccheney / httpInterceptor.js
Last active May 7, 2022 05:12
axios http interceptor with minimum delayed response
const httpInterceptor = {
setupInterceptors: () => {
axios.interceptors.request.use((config) => {
return {
...config,
p0: performance.now(),
};
}, (error) => Promise.reject(error));
axios.interceptors.response.use(async (response) => {
BEGIN MESSAGE.
eQCKK9si7YiXufa 4aPsTU92zY5e7FI jLJKkTW5rIvslLZ 3yOU9yPVjzj4yHn
zwYD47fegZMtkh3 lfiegidXyyiTCKq 6Xr2MZHgg77oB4G as9YMaAkWDwV1d5
fflfrmizBSymh02 zLdFbYsdUZaCV2M FwcgopQPvT6Cntu nnTbKM6OW0qnqhn
o9KyTQhN1osxW35 62BDLBzvAPC656Z 3DloY2IP.
END MESSAGE.