Skip to content

Instantly share code, notes, and snippets.

View anamorph's full-sized avatar
🇧🇭
Hello from sunny Bahrain !

Nicolas David anamorph

🇧🇭
Hello from sunny Bahrain !
View GitHub Profile
@anamorph
anamorph / powermac-g5_ubuntu_and_audio.txt
Last active December 22, 2015 01:02
PowerMac g5 - ubuntu & Audio
### info
this works on my powermac g5 dual 1.8ghz with ubuntu 14.04.
#### modify /etc/modules to match:
apm_emu
loop
# snd-powermac
snd_aoa_i2sbus
snd_aoa_fabric_layout
# snd_aoa_codec_tas
snd_aoa_codec_onyx
@anamorph
anamorph / aws_enable_NAT.sh
Created December 17, 2015 13:22
Standard NAT enablement for AWS EC2 Instances
#!/bin/bash
# Configure the instance to run as a Port Address Translator (PAT) to provide
# Internet connectivity to private instances.
function log { logger -t "vpc" -- $1; }
function die {
[ -n "$1" ] && log "$1"
log "Configuration of PAT failed!"
exit 1
@anamorph
anamorph / applescript-mslync-update-location.scpt
Last active December 2, 2015 18:10
applescript-mslync-update-location.scpt
(*
applescript-mslync-update-location
author: nicolas.david@anamor.ph
desc: the idea with this is to update your location in Microsoft Lync according to your network location.
update the following to adapt to your usage:
MYNIC to your network interface name
MYSSID to your wifi's ssid
MYIPRANGE to your wireless network ip range (referenced above via MYSSID)
@anamorph
anamorph / enable_cloudtrail.sh
Created October 30, 2015 20:45
# Create trails in all AWS standard regions with the AWS CLI and Linux.
# Create trails in all AWS standard regions with the AWS CLI and Linux.
SCRIPTNAME=$0
if [ -z $3 ]
then
echo "$SCRIPTNAME is missing parameters.
Usage: $SCRIPTNAME bucket region profile
Example: $SCRIPTNAME my-cloudtrail-bucket eu-west-1 default"
else
CLOUDTRAIL_S3_BUCKET=$1
REGION_FOR_GLOBAL_EVENTS=$2
@anamorph
anamorph / cleanup_s3_bucket.sh
Created October 18, 2015 23:21
recursively deletes all objects in a bucket
# recursively deletes all objects in a bucket where
# $1 is the bucket name
#
# created as a reminder ...
aws s3 rm --recursive s3://$1
@anamorph
anamorph / my-lightroom-policy.json
Created September 22, 2015 09:29
HOWTO Lightroom sync with s3 windows/macos - Lightroom Policy
{
"Id": "Policy1442860910448",
"Version": "2012-10-17",
"Statement": [
{
"Sid": "Stmt1442860826662",
"Action": [
"s3:ListBucket"
],
"Effect": "Allow",
@anamorph
anamorph / HOWTO-Lightroom_sync_with_s3-windows-macos.md
Last active March 28, 2024 14:58
HOWTO Lightroom sync with s3 windows/macos

HOWTO Lightroom sync with s3 windows/macos

1. The pitch

As I am an avid photographer & travelling quite a lot, I wanted to sync my Adobe Lightroom library from Macbook to my Microsoft Windows desktop at home with very little/no human intervention. It is also a good thing that both Lightroom versions (mac & windows) share a common file system/structure, this helped alot in synchronizing data from one environment to another.

This HOWTO assumes you already have an AWS account created and running with an IAM user configured.

Put together, the solution would look as such (pardon my poor diagram skills):

                                  _  
macbook pro                     (`  ).                     windows desktop
@anamorph
anamorph / NVRAM_reset.md
Last active October 31, 2018 14:19
NVRAM reset on HP LaserJet 400 colorMFP M475dn
  1. disconnect all cables, leave power cable connected.
  2. note the position of the "ready" message on the screen. It is located on the home screen, at the bottom right.
  3. power off the printer, using the power button.
  4. touch and hold where you have located the "ready" message in step 2.
  5. power on the printer while holding the screen.
  6. continue to hold while the printer is booting.
  7. after a few minutes, the printer will reboot. you can now unhold the screen.
  8. plug back all cables in their original location.
  9. you can now configure the printer again; it has successfully be resetted to its factory settings.
@anamorph
anamorph / public_key.sh
Created July 21, 2015 22:10
creating public key from private key
# generates public key form private key where
# $1 is the source private key
# $2 is the ouput public key
#
# created as a reminder ...
ssh-keygen -y -f $1 > $2
@anamorph
anamorph / HOWTO Install AWS CLI on Debian.md
Last active July 30, 2022 09:50
HOWTO Install AWS CLI on Debian

HOWTO Install AWS CLI on Debian

1. installing pre-reqs

sudo apt-get install python python-pip

2. installing the cli:

sudo pip install awscli

3. configuring the cli:

aws configure