How to add printers in NUS

Something that I do often, so I’m keeping them here for easy access.

Windows

SOC Printers

  1. Right click My Computer > Map Network Drive.
  2. Map a drive letter to \nts27\pc
  3. Key in NUSNET account and password.
  4. Go to Devices and Printers in the Control Panel
  5. Choose Add a printer.
  6. Click on The printer that I want isn’t listed.
  7. Choose Select a shared printer by name.
  8. Type in \nts27\

Printer on Level 1 Technical Services: psts, pstsb, pstsc

Printer on B1: psc011, psc008

  1. *note: if you want to print double sided, add “-dx” suffix to the printer name, for single sided, add “-sx” suffix to the printer name.
  2. Click on Install Driver.

USP Printers

  1. Press Windows Key + R
  2. Type \172.16.29.84
  3. Key in NUSNET account and password.
  4. Go to Devices and Printers in the Control Panel
  5. Choose Add a printer.
  6. Click on The printer that I want isn’t listed.
  7. Choose Select a shared printer by name.
  8. Type in \172.16.29.84
  9. Send print jobs to printer
  10. Release at the print release station with your NUSNET id

UTown Printers

Same as USP printers, but choose the correct IP address.

How to prevent hotlinking in AWS S3

Simple way to prevent hotlinking via referer fields in the HTTP Request.
(Does not block crafted requests)

  1. Go to AWS S3 Console
  2. Go to your bucket name -> Permissions -> Bucket Policy
  3. Enter the following policy (with replacement at the correct places)
    {
    "Version": "2008-10-17",
    "Id": "",
    "Statement": [
        {
            "Sid": "Allow in my domains",
            "Effect": "Allow",
            "Principal": {
                "AWS": "*"
            },
            "Action": "s3:GetObject",
            "Resource": "arn:aws:s3:::imsj-wordpress/*",
            "Condition": {
                "StringLike": {
                    "aws:Referer": "https://imsj.dev/*"
                }
            }
        },
        {
            "Sid": "Deny access if referer is not my sites",
            "Effect": "Deny",
            "Principal": {
                "AWS": "*"
            },
            "Action": "s3:GetObject",
            "Resource": "arn:aws:s3:::imsj-wordpress/*",
            "Condition": {
                "StringNotLike": {
                    "aws:Referer": "https://imsj.dev/*"
                }
            }
        }
    ]
    }