This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
!/usr/bin/env bash | |
# Install Brew and Python3 | |
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
brew doctor | |
brew install python3 | |
# Install Python3 Manually | |
curl https://www.python.org/ftp/python/3.7.0/python-3.7.0-macosx10.9.pkg > python-3.7.0-macosx10.9.pkg | |
sudo installer -store -pkg python-3.7.0-macosx10.9.pkg -target / |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
const path = require('path'); | |
const webpack = require('webpack'); | |
const PnpWebpackPlugin = require('pnp-webpack-plugin'); | |
const HtmlWebpackPlugin = require('html-webpack-plugin'); | |
const CaseSensitivePathsPlugin = require('case-sensitive-paths-webpack-plugin'); | |
const InterpolateHtmlPlugin = require('react-dev-utils/InterpolateHtmlPlugin'); | |
const WatchMissingNodeModulesPlugin = require('react-dev-utils/WatchMissingNodeModulesPlugin'); | |
const ModuleScopePlugin = require('react-dev-utils/ModuleScopePlugin'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Tesla CPO Photos Downloader | |
# Tired of seeing blurry images of your Tesla CPO order? | |
# Insert the url your sales rep sent you with the blurry images, | |
# and have the high resolution versions downloaded to your computer! | |
# | |
# Simply run: | |
# python3 tesla-cpo-photos.py https://backwebs.homenetinc.com/tesla/details/@/your-unique-reference-number/ | |
# | |
# No dependencies required | |
# Dylan Stein ([email protected]) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { print } from 'graphql/language/printer' | |
import { useContext, useEffect, useState } from 'react' | |
export function createWebsocket({ name, uri, token, query, onMessage }) { | |
if (!uri) { | |
let subscriptionProtocol = process.env.REACT_APP_API_URL.includes( | |
'https', | |
) | |
? 'wss' | |
: 'ws' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# since AWX is trash software and they dont fix their own bugs please use this as the Source Control Refspec | |
# when adding a GitHub Repo to an AWX Project | |
+refs/heads/*:refs/remotes/origin/* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
torch.cuda.OutOfMemoryError: CUDA out of memory. Tried to allocate 16.00 MiB (GPU 0; 6.00 GiB total capacity; 5.25 GiB already allocated; 0 bytes free; 5.31 GiB reserved in total by PyTorch) If reserved memory is >> allocated memory try setting max_split_size_mb to avoid fragmentation. See documentation for Memory Management and PYTORCH_CUDA_ALLOC_CONF |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# fish version | |
set -gx POD_NAME (kubectl get pods -n <namespace> --output json | jq -r -c '.items[].metadata | select(.name | contains("some name"))'.name | grep -v "excluded value" | grep -m 1 "some name") | |
kubectl exec -it {$POD_NAME} -n <namespace> -- /bin/bash | |
# for celery but not celery beat | |
set -gx POD_NAME (kubectl get pods -n backend-dev --output json | jq -r -c '.items[].metadata | select(.name | contains("celery"))'.name | grep -v "beat" | grep -m 1 "celery") | |
# bash version | |
POD_NAME=$(kubectl get pods -n backend-dev --output json | jq -r -c '.items[].metadata | select(.name | contains("celery"))'.name | grep -v "beat" | grep -m 1 "celery") | |
kubectl exec -it -n backend-dev ${POD_NAME} -- /bin/bash |