Skip to content

Instantly share code, notes, and snippets.

View ccheney's full-sized avatar
🌎
💥🚀

Chris Cheney ccheney

🌎
💥🚀
  • @Collaboration.AI
  • mpls
View GitHub Profile
BEGIN MESSAGE.
eQCKK9si7YiXufa 4aPsTU92zY5e7FI jLJKkTW5rIvslLZ 3yOU9yPVjzj4yHn
zwYD47fegZMtkh3 lfiegidXyyiTCKq 6Xr2MZHgg77oB4G as9YMaAkWDwV1d5
fflfrmizBSymh02 zLdFbYsdUZaCV2M FwcgopQPvT6Cntu nnTbKM6OW0qnqhn
o9KyTQhN1osxW35 62BDLBzvAPC656Z 3DloY2IP.
END MESSAGE.
@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) => {
@ccheney
ccheney / tcplisteners
Last active February 27, 2018 02:44
see processes listening on what port
lsof -iTCP -sTCP:LISTEN -P
@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
We couldn’t find that file to show.
/**
* A bind polyfill for browsers that don't support the bind method.
*/
if (!Function.prototype.bind) {
Function.prototype.bind = function (oThis) {
if (typeof this !== 'function') {
// closest thing possible to the ECMAScript 5 internal IsCallable function
throw new TypeError('Function.prototype.bind - what is trying to be bound is not callable');
}
var aArgs = Array.prototype.slice.call(arguments, 1), fToBind = this, fNOP = function () {
@ccheney
ccheney / config.cson
Last active August 29, 2015 13:57
Atom Config
'editor':
'fontSize': 14
'fontFamily': 'Ubuntu Mono'
'lineHeight': 1.5
'showIndentGuide': true
'tabLength': 4
'hideIgnoredNames': true
'core':
'themes': [
'atom-dark-ui'
@ccheney
ccheney / css-comb-sort-order
Created December 6, 2013 21:34
Property sorting order for CSS Comb
$default_sort_order = '[
"display",
"overflow",
"-ms-overflow-x",
"-ms-overflow-y",
"overflow-x",
"overflow-y",
"visibility",
"width",
"min-width",
@ccheney
ccheney / gist:6223061
Last active December 21, 2015 00:49
Sublime Pref
{
"caret_style": "phase",
"detect_slow_plugins": false,
"font_face": "Ubuntu Mono",
"font_options": [
"subpixel_antialias"
],
"font_size": 12,
"highlight_line": true,
"highlight_modified_tabs": true,
@ccheney
ccheney / gist:4389114
Created December 27, 2012 15:38
jQuery: Convert HTML Table to JSON
(function($){
var convertTableToJson = function()
{
var rows = [];
$('table tr').each(function(i, n){
var $row = $(n);
rows.push({
display_name: $row.find('td:eq(0)').text(),
first_name: $row.find('td:eq(1)').text(),
last_name: $row.find('td:eq(2)').text(),