Skip to content

Instantly share code, notes, and snippets.

View brettfreer's full-sized avatar

Brett Freer brettfreer

View GitHub Profile
@azizur
azizur / Creating a static copy of a dynamic website.md
Last active July 9, 2024 03:00
Creating a static copy of a dynamic website

The command line, in short…

wget -k -K -E -r -l 10 -p -N -F --restrict-file-names=windows -nH http://website.com/

…and the options explained

  • -k : convert links to relative
  • -K : keep an original versions of files without the conversions made by wget
  • -E : rename html files to .html (if they don’t already have an htm(l) extension)
  • -r : recursive… of course we want to make a recursive copy
  • -l 10 : the maximum level of recursion. if you have a really big website you may need to put a higher number, but 10 levels should be enough.
  1. Download instantclient-basic-macos.x64-11.2.0.4.0.zip and instantclient-sdk-macos.x64-11.2.0.4.0.zip from http://www.oracle.com/technetwork/topics/intel-macsoft-096467.html to ~/
  2. cd ~
  3. unzip instantclient-basic-macos.x64-11.2.0.4.0.zip
  4. unzip instantclient-sdk-macos.x64-11.2.0.4.0.zip
  5. cd instantclient_11_2
  6. ln -s libclntsh.dylib.11.1 libclntsh.dylib
  7. cd ~
  8. wget https://github.com/vrogier/ocilib/releases/download/v4.2.1/ocilib-4.2.1-gnu.tar.gz
  9. tar -zxvf ocilib-4.2.1-gnu.tar.gz
  10. cd ocilib-4.2.1
@shentonfreude
shentonfreude / dynamodb_read_backoff.py
Created December 11, 2015 17:00
Wrap boto3 dynamodb in an exponential backoff to avoid ProisionedThroughputExceededException
#!/usr/bin/env python
# An exponential backoff around Boto3 DynamoDB, whose own backoff eventually
# fails on long multipage scans. We'd like to use this as a wrapper somehow,
# see: https://gist.github.com/numberoverzero/cec21b8ca715401c5662
from time import sleep
import boto3
from boto3.dynamodb.conditions import Attr
@warnergodfrey
warnergodfrey / gist:7512051
Last active September 21, 2018 03:20
Access the ATO Business Portal using AusKey Mac OS X Mountain Lion
  • Install the latest JRE from Oracle
  • In the Java Control Panel, go to the Security tab and make sure 'Enable Java Content' is checked
  • Open Safari
  • Go to the ATO Business portal site https://bp.ato.gov.au/BpStatics/homepage.htm
  • Click Login
  • A dialog will apear asking you 'Do you want to trust the website “authentication.business.gov.au” to use the “Java” plug-in?'
  • Click 'Trust'
  • Now you will be asked 'Do you want to run this application?'
  • Click 'Run'
  • Another dialog will appear asking you to 'Allow access to the following application from this website?'