Skip to content

Instantly share code, notes, and snippets.

View kodie's full-sized avatar
💻
#doworkson

Kodie Grantham kodie

💻
#doworkson
View GitHub Profile
@magician11
magician11 / listen-for-shopify-webhooks.js
Created November 21, 2016 08:06
How to listen to Shopify webhook event data with Node.js
/* eslint-disable no-console */
const express = require('express');
const bodyParser = require('body-parser');
const app = express();
/*
Shopify issues a HTTP POST request.
- https://help.shopify.com/api/tutorials/webhooks#receive-webhook
@tegansnyder
tegansnyder / Preventing-Puppeteer-Detection.md
Created February 23, 2018 02:41
Preventing Puppeteer Detection

I’m looking for any tips or tricks for making chrome headless mode less detectable. Here is what I’ve done so far:

Set my args as follows:

const run = (async () => {

    const args = [
        '--no-sandbox',
        '--disable-setuid-sandbox',
        '--disable-infobars',
@kodie
kodie / parse_argv.php
Last active January 10, 2022 17:09
Parse $argv in PHP get the command, arguments, options, and flags
<?php
/**
* Parses $argv to get the command, arguments, options, and flags.
*
* @param array $args The $argv variable.
* @param array $short_opts Optional. An array with keys set to short options and their values set to the long option they're assigned to.
* @param array $flag_opts Optional. An array of options to be treated as flags. If a flag is not defined here, it will be treated as an option.
*
* @return array An array with the command, arguments, options, and flags keys.
*/
@kodie
kodie / updateModified.js
Last active April 15, 2024 07:02
A JavaScript function for Google Sheets that updates a specific cell with the current date/time when cell(s) are updated.
function getColumnNumberByName(name, sheet) {
if (!sheet) {
sheet = SpreadsheetApp.getActiveSheet()
}
var headers = sheet.getDataRange().offset(0, 0, 1).getValues()[0]
var column = false
for (var i = 0; i < headers.length; i++) {
if (headers[i].trim() === name) {