Skip to content

Instantly share code, notes, and snippets.

💭
Stay'n cold in Minnesota

Tegan Snyder tegansnyder

💭
Stay'n cold in Minnesota
Block or report user

Report or block tegansnyder

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View Preventing-Puppeteer-Detection.md

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',
@tegansnyder
tegansnyder / hdfs_file_cleanup_cron.sh
Created Oct 17, 2017
HDFS cron to delete old files in directory
View hdfs_file_cleanup_cron.sh
#!/bin/bash
now=$(date +%s);
days_to_keep=5
# Loop through files
hdfs dfs -ls /some_hdfs_directory | while read f; do
# Get File Date and File Name
file_date=`echo $f | awk '{print $6}'`;
file_name=`echo $f | awk '{print $8}'`;
View pyspark error.md

I'm recieving a strange error on a new install of Spark. I have setup a small 3 node spark cluster on top of an existing hadoop instance. The error I get is the same for any command I try to run on pyspark shell I get the following error:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/opt/spark/python/pyspark/rdd.py", line 1041, in count
    return self.mapPartitions(lambda i: [sum(1 for _ in i)]).sum()
  File "/opt/spark/python/pyspark/rdd.py", line 1032, in sum
    return self.mapPartitions(lambda x: [sum(x)]).fold(0, operator.add)
  File "/opt/spark/python/pyspark/rdd.py", line 906, in fold
View Flushing DNS cache macOSX Sierra.sh
sudo dscacheutil -flushcache;sudo killall -HUP mDNSResponder;say flushed
@tegansnyder
tegansnyder / MacOS Sierra - Custom PHP Compiled from Source with Threading and Custom ODBC Support.md
Last active Jun 29, 2019
MacOS Sierra - Custom PHP Compiled from Source with Threading and Custom ODBC Support
View MacOS Sierra - Custom PHP Compiled from Source with Threading and Custom ODBC Support.md

I recently got a new Macbook Pro and wanted to document how I setup my PHP environment. I like full control of how PHP is built and I usually build it from source. I do this because I often add custom extensions and modules not found in the common PHP OSX installers. If your looking for a easier method than building from source try https://php-osx.liip.ch/.

NOTE: This post assumes you are running a fresh install of MacOS Sierra 10.12.16 with System Integrity Protection disabled. If you don't know how to disable it just boot into recovery mode and open a terminal and type csrutil disable, or google search it :) This post also assumes you are using Zsh instead of Bash shell. If you are using Bash you can replace anytime you see ~/.zshrc with ~/.bashrc.

First lets get some of the prerequisites. Start by grabbing the command line tools neccessary:

xcode-select --install
@tegansnyder
tegansnyder / Details On Fixing USB-C Gigabyte Ethernet Adaptor in 2016 Macbook Pro.md
Created Dec 20, 2016
Late 2016 Macbook Pro - Solving an issue with USB-C Gigabyte Ethernet Adaptor
View Details On Fixing USB-C Gigabyte Ethernet Adaptor in 2016 Macbook Pro.md

I recently recieved a new Macbook Pro. This was one of the latest 2016 models, that have the touchbar. Mine took a little longer to ship as I got it maxed out. When i arrived I went through the standard setup proceedure for a new mac. I then attempted to hook up a USB-C Ethernet Adaptor from C2G. It was suppose to work right out of the box, but it didn't work. I hooked the same device into another collegue of mines new Macbook Pro 2016 and it worked. I could see the Network panel load a device by the name of "AX88179 USB 3.0 to Gigabit Ethernet". So I went looking on the internet, thinking if I could find the driver and install it on my mac, I could get it work. I found the USB-C driver here: http://www.asix.com.tw/FrootAttach/driver/AX88179_178A_Macintosh_10.6_to_10.12_Driver_Installer_v2.8.0_20161108.zip

For those that are scratching your head trying to figure out why your USB-C Ethernet adapter is not working maybe that could help. It did for me.

View airflow_notes.md
@tegansnyder
tegansnyder / Using PHP ZTS (Zend Thread Safety) module and pthreads on PHP7 Webstatic Repo (Centos-RHEL).md
Last active Sep 26, 2019
Using PHP ZTS (Zend Thread Safety) module and pthreads on PHP7 Webstatic Repo (Centos/RHEL)
View Using PHP ZTS (Zend Thread Safety) module and pthreads on PHP7 Webstatic Repo (Centos-RHEL).md

BECOM SUDO USER:

sudo -s

INSTALL WEBSTATIC REPO FOR CENTOS/RED HAT 7:

rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
View Starting Kafka.md
dzdo -s
cd /usr/bin
zookeeper-server-start -daemon /etc/kafka/zookeeper.properties
kafka-server-start -daemon /etc/kafka/server.properties
schema-registry-start -daemon /etc/schema-registry/schema-registry.properties


# toping
dzdo -s
View keybase.md

Keybase proof

I hereby claim:

  • I am tegansnyder on github.
  • I am tegansnyder (https://keybase.io/tegansnyder) on keybase.
  • I have a public key whose fingerprint is 6D1F 93B8 4667 46BB D542 AEDE 6BE5 2621 472A FF08

To claim this, I am signing this object:

You can’t perform that action at this time.