Skip to content

Instantly share code, notes, and snippets.

View laingc's full-sized avatar

Christopher Laing laingc

View GitHub Profile
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIM1heXX7FJwRYZJDaoErgwSjuTIwPnSu2M7X5qoEaVsY christopher.laing.private.ed25519
@laingc
laingc / edgerouter_config_202007261400.txt
Last active April 16, 2023 05:28
edgerouter_log_202007261400.txt
firewall {
all-ping enable
broadcast-ping disable
ipv6-receive-redirects disable
ipv6-src-route disable
ip-src-route disable
log-martians enable
name WAN_IN {
default-action drop
description "WAN to internal"
#!/usr/env/python
import hashlib, os
def md5(fname):
try:
hash_md5 = hashlib.md5()
with open(fname, "rb") as f:
for chunk in iter(lambda: f.read(4096), b""):
hash_md5.update(chunk)
@laingc
laingc / Export Photos.app Albums
Created May 13, 2015 21:37
A (somewhat buggy) script to export all albums from Photos.app to a directory. Based on the script written by Nic Fletcher (see https://discussions.apple.com/message/28098849#28098849)
-- A (somewhat buggy) script to export all albums from Photos.app to a directory
-- Based on the script written by Nic Fletcher (see https://discussions.apple.com/message/28098849#28098849)
set srcParent to "iPhoto Events" -- Folder that album is in
set exportBase to "some:path:"
tell application "Photos"
set albList to name of every container of container srcParent
end tell
repeat with albSource in albList
set folderExists to false
### Keybase proof
I hereby claim:
* I am chrislaing on github.
* I am chrislaing (https://keybase.io/chrislaing) on keybase.
* I have a public key whose fingerprint is 22C1 42AA 5828 23B3 4490 740F ED53 5213 043D ED8D
To claim this, I am signing this object:
Verifying myself: My Bitcoin username is +chrislaing. https://onename.io/chrislaing

Keybase proof

I hereby claim:

  • I am chrislaing on github.
  • I am chrislaing (https://keybase.io/chrislaing) on keybase.
  • I have a public key whose fingerprint is 3F2A 7922 342C F885 130E 5B2B 65C5 FFA2 D956 81E1

To claim this, I am signing this object: