Skip to content

Instantly share code, notes, and snippets.

View mightbesimon's full-sized avatar
😎
excited

Simon mightbesimon

😎
excited
View GitHub Profile
@mightbesimon
mightbesimon / .bash_profile
Created July 26, 2022 01:53
run `$ firealarm` before leaving the building
alias firealarm=$'git checkout main && git commit -a -m \'[draft] fire alarm\' && git push --force --set-upstream origin main'
@mightbesimon
mightbesimon / QR code detection.py
Created July 25, 2021 05:46
QR code detection - Image processing
''' COMPSCI 373 (2021) - University of Auckland
ASSIGNMENT ONE - QR Code Detection
Simon Shan  441147157
[!] * * * PLEASE NOTE * * * [!]
In this code, sobel and mean kernel operations may look weird.
They are optimised for speed.
For example, instead of [1 0 -1] * [a b c] = [1*a, 0*b, -1*c],
it is simply a - c in my representation
'''
@mightbesimon
mightbesimon / SixLiner.m
Created February 21, 2020 07:31
UoA Engineering ENGGEN 131 s2 2019 MATLAB project
function [medianImage , maxImage] = SixLiner(dirName , fileType)
% SixLiner: does the matlab project in six lines of code
%
% inputs : dirName = directory of the images
% fileType = file extension type of the images
% outputs :medianImage = image background
% maxImage = images combined on background
%
% by simon shan
@fnky
fnky / ANSI.md
Last active July 17, 2024 15:58
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
@jonjack
jonjack / add-update-refresh-github-access-token-on-mac.md
Last active July 6, 2024 22:04
Adding & Updating GitHub Access Token on Mac

Using an Access Token for the first time

Follow the instructions on Github to Create an Access Token in Github

Configure Git to use the osxkeychain

By default, git credentials are not cached so you need to tell Git if you want to avoid having to provide them each time Github requires you to authenticate. On Mac, Git comes with an “osxkeychain” mode, which caches credentials in the secure keychain that’s attached to your system account.

You can tell Git you want to store credentials in the osxkeychain by running the following:-

@Pathoschild
Pathoschild / stardew-mod-recommendations.md
Last active July 14, 2024 23:23
Stardew Valley mod recommendations

Here are the mods I recommend. These are all compatible with the latest versions of SMAPI and Stardew Valley on Linux/macOS/Windows. See the player's guide to using mods if you're interested.

Quality of life

I think the best mods are those which improve the game while maintaining its balance, lore, and style.

  • AutoGate
    Gates open automatically when you approach and close behind you.

  • Better Sprinklers Plus
    Customise the sprinkler radius, with a proportional change to their cost. If you're willing to mine all the ores you'll need, that makes the basic sprinklers useful early in the game and lets you do more than just watering crops every day.

@troyfontaine
troyfontaine / 1-setup.md
Last active July 15, 2024 13:01
Signing your Git Commits on MacOS

Methods of Signing Git Commits on MacOS

Last updated March 13, 2024

This Gist explains how to sign commits using gpg in a step-by-step fashion. Previously, krypt.co was heavily mentioned, but I've only recently learned they were acquired by Akamai and no longer update their previous free products. Those mentions have been removed.

Additionally, 1Password now supports signing Git commits with SSH keys and makes it pretty easy-plus you can easily configure Git Tower to use it for both signing and ssh.

For using a GUI-based GIT tool such as Tower or Github Desktop, follow the steps here for signing your commits with GPG.

@geekmanager
geekmanager / make-git-use-sublime.markdown
Last active June 14, 2024 10:11
Making git use Sublime Text for rebase etc

Making git use Sublime Text

First up, let's make Sublime Text 2 available from the command line in terminal, by creating a link to subl which is the launcher from terminal:

ln -s /Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin/subl /usr/local/bin/sublime

(added bonus of this approach is when you upgrade to ST3 or change text editor, you can just redirect the symlink).

If there's any chance that bash doesn't check usr/local/bin then use [Launch Sublime Text 2 from Mac OSX Terminal] for more detailed instructions on how to make this happen.