Category: Tips

  • Going Mac – Part 4

    Set up from scratch

    It’s silly how many settings aren’t sync’d to one’s Apple account.

    MacOS install

    TBF, this part would be more difficult to arrange since you’d have to log in.

    • Select Language and Location
    • Select WiFi
    • Enable Location
    • Allow Screen Time
    • Disable Siri
    • Allow FileVault
    • Setup Touch ID (add other index finger later)
    • Skip Apple Pay
    • Light / Dark / Auto mode

    MacOS settings

    • Control Centre, Clock Options, Show Seconds
    • Trackpad settings
      • Secondary click
        • Two Fingers
      • Enable Tap to click
      • More Gestures
        • Disable Notification Centre, Mission Control, Launchpad, Show Desktop

    • Empty the Dock
    • Turn on Dock Hiding

    • create ~/code directory

    • Replace Finder Sidebar items with folders in iCloud
    • Finder Settings
      • Advanced
        • Show all filename extensions
        • Keep folders on top
    • Cmd+Shift+. to show hidden files

    Installs

    JetBrains

    • Run JetBrains Toolbox, login, install
      • Open JB product
        • Do not import settings
        • Disable AI Assistant
        • Settings Sync
          • Fetch settings, restart
        • GitHub CoPilot
          • Sign in

    GitKraken

    • Sign in with email

    Appearance

    • Change Wallpaper

    Alfred

    • Disable Spotlight shortcut
      • System Settings, Keyboard, Shortcuts, Spotlight
    • Set Alfred shortcut
    • Import Alfred Prefs
      • and workflows
      • and snippets (e.g. emoji)
    • Enable clipboard history
      • and Advanced, Diacritic and …
  • Going Mac – Part 3

    So it seems I’m not going back. I still use a Windows machine for the family PC, but here I am on another MacBook Pro for work.

    Install Brew with this

    /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

    Then save the following as a Brew bundle file, `Brewfile`

    tap "homebrew/bundle"
    tap "homebrew/cask-fonts"
    brew "n"
    brew "powerlevel10k"
    brew "zsh-autosuggestions"
    brew "zsh-syntax-highlighting"
    cask "alfred"
    cask "font-fira-code"
    cask "gitkraken"
    cask "hyper"
    cask "jetbrains-toolbox"
    cask "notunes"
    cask "rectangle"
    cask "whatsapp"

    and run brew bundle.

    Install Oh My Zsh with

    sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

    Aliases to add to the end of ~/.zshrc:

    alias ls="eza"
    alias l="eza -la"
    alias c="clear"
    alias cat="bat"

  • Going Mac – Part 2

    In a follow up to my previous posts, I’m updating my list of brew installs, and have discovered the bundle subcommand.

    Here’s my Brewfile:

    tap "homebrew/bundle"
    tap "homebrew/cask"
    tap "homebrew/cask-fonts"
    tap "homebrew/cask-versions"
    tap "homebrew/core"
    tap "homebrew/services"
    brew "btop"
    brew "freetype"
    brew "figlet"
    brew "httpie"
    brew "ncdu"
    brew "the_silver_searcher"
    brew "tldr"
    brew "unar"
    cask "alfred"
    cask "amazon-music"
    cask "firefox"
    cask "font-fira-code-nerd-font"
    cask "fontgoggles"
    cask "gitkraken"
    cask "http-toolkit"
    cask "hyper"
    cask "jetbrains-toolbox"
    cask "notunes"
    cask "postman"
    cask "proxyman"
    cask "rectangle"
    cask "rocket"
    cask "slack"
    cask "the-unarchiver"
    cask "whatsapp"
  • How To Upload Video From Google Photos To YouTube

    Because Google apparently hate their users (including paying customers), it’s no longer possible to upload videos directly from their own service photos.google.com to their own service youtube.com, but you can share from the app to YouTube.

    So while it automatically uploads (backs up) to their servers, you will have to endure a slow concurrent upload to their servers.

    smh

  • How to change notification sounds per app

    There are many articles online explaining how to change the default notification sound, but I found it hard to find one which explains how to do it for individual / specific apps.

    There are many articles which simply (and unhelpfully) say that the app should have its own settings, so for those that don’t, here’s how:

    Android

    v9 “Pie”

    There are quite a lot of steps here, and one in particular is not obvious.
    It’s easiest to demonstrate with screenshots.

    I suggest you open the relevant app just prior to following this guide.

    Open the main Android Settings Page by dragging down from above the top of the screen.

    Tap “Apps & notifications”

    Select the relevant app, probably from the recent apps list, but you might have to scroll through the list of all apps.

    Tap “Notifications”.

    Make sure “Show notifications” is turned on, and tap the relevant category (there may be only one), this is not just a checkbox.

    Make sure Show notifications is turned on here too…

    …and that the behavior includes sound.

    Tap “Sound”.

    Select your sound, and you’re done.

  • Regex to split “){” to two lines, retaining indenting

    I was quite proud to come up with this, so here’s my first blog post for a while:

    Search:
    ^([^\S\n]*)(.+))\s*{

    Replace:
    $1$2)\n$1{

    and as a bonus:
    ^([^\S\n]*)}\s*else\s*{
    $1}\n$1else\n$1{

    NB (2013-09): it seems that the escaping slashes in this post were lost  at some point, I’ve put them back, but not tested!

  • JavaScript Bug – Modulo of small numbers

    It seems that there is a problem with the modulo function, ‘%’, in JavaScript.

    For example: 10 % 0.1 should equate to zero but comes out as 0.09999999999999945 probably due to some internal floating-point rounding errors.

    Easy solution (a hack really): Multiply both numbers by 1000 before using the modulo function.

  • IE7 Tip – Reload

    IE7 Tip - ReloadWhen IE7 was designed they took the peculiar decision to split the navigation buttons into three places (if you include the home button).

    If you find yourself up in the top left wanting to reload, just click the drop-down button and select the current page (will be highlighted and have a tick-mark on the left), as shown in the picture.

    Bizarrely and unfortunately, this only works if you’re not looking at the last page in your navigation history for this tab. This suggests that it’s only through poor programming logic that it works at all.

    [tags]IE,IE7,Microsoft,tip,tips,browser,flaw,bug[/tags]

  • Firefox Tip

    I discovered yesterday that [tag]bookmarks[/tag] in [tag]Firefox[/tag] can have no name.

    Seems pointless? Not if the sites have [tag]favicons[/tag]:

    Firefox Bookmark Favicons

    Space saving, so you can see more, hence fewer clicks.

    The above are jazzle.co.uk, The Sketchup Components Collection, bit-tech, ebay, amazon, radiotimes.com and the default icon (for a site with no [tag]favicon[/tag]), but you knew that of course since you recognise the sites’ icons.