Skip to content

Instantly share code, notes, and snippets.

Avatar
🤖
Live Life and Prosper

Andrew Thompson andrewpsp

🤖
Live Life and Prosper
View GitHub Profile
View gist:af293099865fe510043697698c34fdf4
sudo /Applications/Install\ macOS\ Mojave.app/Contents/Resources/createinstallmedia --volume /Volumes/Untittled
View jq to filter by value.md

JQ to filter JSON by value

Syntax: cat <filename> | jq -c '.[] | select( .<key> | contains("<value>"))'

Example: To get json record having _id equal 611

cat my.json | jq -c '.[] | select( ._id | contains(611))'

Remember: if JSON value has no double quotes (eg. for numeric) to do not supply in filter i.e. in contains(611)

@andrewpsp
andrewpsp / gist:c0c01cca5acd6364bbefc1068e662c7a
Created Aug 12, 2019
2019 release - binance API - python
View gist:c0c01cca5acd6364bbefc1068e662c7a
python-binance Documentation
Release 0.2.0
Sam McHardy
Aug 12, 2019
Contents
1 Note 1
2 Features 3
3 Quick Start 5
4 Donate 7
@andrewpsp
andrewpsp / nginx.conf
Created Jul 24, 2019 — forked from shortjared/nginx.conf
AWS API Gateway Nginx Reverse Proxy
View nginx.conf
# NOTE
#
#
# Use sed on the instance up to replace the INSTANCE_ID and DNS_RESOLVER with the following commands
#
####################################################################################################
# Fetch the private IP for resolving DNS dynamically in nginx
# We also need to escape the `.` from it for usage in later sed
#
# DNS_RESOLVER=`grep nameserver /etc/resolv.conf | cut -d " " -f2 | sed 's/\./\\./g'`
@andrewpsp
andrewpsp / brain_load.sh
Created Jan 22, 2019
Script to update the Grub.
View brain_load.sh
#!/bin/bash
# current version
CURRENT=$(uname -r)
#highest version in on system
HIGH=$(rpm -qa kernel | cut -c 8- | sort| head -n 1)
View gist:228f553965a66612406952c1c253b32f
# install boost 1.66+
ARG boost_version=1.66.0
ARG boost_dir=boost_1_66_0
#RG boost_sha256_sum=440a59f8bc4023dbe6285c9998b0f7fa288468b889746b1ef00e8b36c559dce1
ENV boost_version ${boost_version}
ARG boost_libs=" \
--with-atomic \
--with-chrono \
--with-date_time \
View gist:76b655e0cc138c3dddc58edb3215a003
Usage ethminer [OPTIONS]
Options:
Work farming mode:
-F,--farm <url> Put into mining farm mode with the work server at URL (default: http://127.0.0.1:8545)
-FF,-FO, --farm-failover, --stratum-failover <url> Failover getwork/stratum URL (default: disabled)
--farm-retries <n> Number of retries until switch to failover (default: 3)
-S, --stratum <host:port> Put into stratum mode with the stratum server at host:port
-SF, --stratum-failover <host:port> Failover stratum server at host:port
-O, --userpass <username.workername:password> Stratum login credentials
View gist:9f08f7e20614f9545d066f01f854810b
#line number 6 to add cuda 9.1 support. instead of removing it.
device_functions.h
View Keybase.md

Keybase proof

I hereby claim:

  • I am andrewpsp on github.
  • I am andrewpsp (https://keybase.io/andrewpsp) on keybase.
  • I have a public key ASAqoihlDXu_C6IU4qekZCuzFl2gzxus5QczujJ2CYusfAo

To claim this, I am signing this object:

@andrewpsp
andrewpsp / mongod.service
Last active Aug 22, 2017
mongod service file
View mongod.service
[Unit]
Description=High-performance, Entercloud Integrated Automated Ditigal Fingerprint Identification System (EIADFIS)
After=network.target
Documentation=https://github.com/entercloud/EIADFIS
[Service]
User=mongodb
Group=mongodb
ExecStart=/usr/bin/mongod --quiet --config /etc/mongod.conf