Skip to content

Instantly share code, notes, and snippets.

View sarah-j-smith's full-sized avatar

Sarah Smith sarah-j-smith

View GitHub Profile
@sarah-j-smith
sarah-j-smith / fresh_clone.sh
Created September 8, 2021 23:45
Fresh clone of your repo
# Get the SSH clone link from your repo and check it out with a distinctive name
mkdir -p ~/src && cd ~/src
git clone [email protected]:my-git-name/RepoWithExposedSecrets.git\
freshRepoWithExposedSecrets
@sarah-j-smith
sarah-j-smith / install_bfg.sh
Created September 8, 2021 23:41
Installing the BFG on Mac
curl -O https://repo1.maven.org/maven2/com/madgag/bfg/1.14.0/bfg-1.14.0.jar
mkdir -p ~/bin
mv -f bfg-1.14.0.jar ~/bin/.
java -jar ~/bin/bfg-1.14.0.jar
@sarah-j-smith
sarah-j-smith / bash_profile
Created September 8, 2021 23:35
Use the Java from your Android Studio
# Install Android Studio then add these lines to your ~/.bash_profile
# Java from Android SDK
export JAVA_HOME="/Applications/Android Studio.app/Contents/jre/jdk/Contents/Home"
export PATH="${JAVA_HOME}/bin:${PATH}"
@sarah-j-smith
sarah-j-smith / README.md
Last active July 18, 2021 06:39
Clean Secrets from a Repo

Cleaning Secrets from a Repo

FIRST: Revoke the secrets from whatever assets or platform they provide access to

Assume that the keys have already fallen in to the hands of bad actors, and immediately change the locks so that the keys are no use.

@sarah-j-smith
sarah-j-smith / Google-Cloud-SSH.sh
Created January 12, 2021 01:43
Connect to Google Cloud Compute instance via SSH using OS-Login
# Creates a portable SSH key that can be offered to any GCP Compute instance you have access to, eg via Google domain login
# Pre-requisites - gcloud Google command line tool. - https://cloud.google.com/sdk/docs/quickstart
curl https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-sdk-322.0.0-darwin-x86_64.tar.gz -o google-cloud-sdk.tar.gz
open -g google-cloud-sdk.tar.gz
./google-cloud-sdk/install.sh
source ~/.bash_profile
# Setup Google login, compute zone, region and project
@sarah-j-smith
sarah-j-smith / LICENSE.txt
Last active November 20, 2019 07:24
Building a Qt app for Windows using IFW
Copyright 2019 Smithsoft Pty Ltd
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
@sarah-j-smith
sarah-j-smith / Tar pipe
Last active October 20, 2024 07:22
The amazingly awesome tar pipe command for copying trees of files around
# https://blog.extracheese.org/2010/05/the-tar-pipe.html
SRC=existing-source-controlled-proj
DEST=copy-of-proj-with-no-git-data
# on Linux and WSL use gnu tar exclude VCS to prevent copying the git data
(cd ${HOME}/depot/${SRC} && tar --exclude-vcs cf - .)|(cd ${HOME}/depot/${DEST} && tar xvfp -)
# on Mac the --exclude-vcs is not available - can add --exclude .git
(cd ${HOME}/depot/${SRC} && tar --exclude='.git' cf - .)|(cd ${HOME}/depot/${DEST} && tar xvfp -)
@sarah-j-smith
sarah-j-smith / fixed-pip.sh
Created June 13, 2018 01:36
Fix for pip incompatibilities
# This Ubuntu issue seems to be affecting Python/pip on Mac - https://github.com/beenje/script.module.requests/issues/21
# requests 2.18.2 has requirement urllib3<1.23,>=1.21.1, but you'll have urllib3 1.23 which is incompatible.
# Force the version of urllib3
pip install urllib3==1.22
@sarah-j-smith
sarah-j-smith / Python3 Virtualenv Setup.md
Last active November 13, 2019 03:43 — forked from pandafulmanda/Python3 Virtualenv Setup.md
TensorFlow/Python3/Jupyter Virtualenv on Mac
@sarah-j-smith
sarah-j-smith / AppDelegate.swift
Last active October 20, 2017 07:16
AWS Mobile Hub + DynamoDB Low-Level API
//
// AppDelegate.swift
//
import UIKit
import AWSPinpoint
import AWSAuthCore
import AWSUserPoolsSignIn
import CocoaLumberjackSwift