Skip to content

Instantly share code, notes, and snippets.

View sming's full-sized avatar
👨‍💻

Peter Kingswell sming

👨‍💻
View GitHub Profile

VS Code wonders

  • ⌘⇧I - show file changes/diff/compare
  • ⌘⇧O - goto symbol in file (works!)
  • ⌘⇧, - go back in edit locations
  • ⌘⇧. - go forward in edit locations
  • ⇧⌘⌃M - View: Maximize Editor Group and Hide Side Bars
  • ⇧⌥M - View: Reset Editor Group Sizes
  • ⌥. + ⌥O - diff with previous version of file
  • ⌃⌥. - pop up, navigable code structure dialog
  • ⌥↓ - git commands
@sming
sming / my-fave-intellij-idea-themes.md
Last active October 30, 2022 23:49
My fave IntelliJ themes. Short names only given. Most are from the The Doki Theme (plugins.jetbrains.com/plugin/10804-the-doki-theme)

My Fave IntelliJ themes

Non-Doki Themes

  • Arc Dark
  • Carbon
  • Coconut
  • Coderpillr Dusk
  • Cyberpunk
  • Darkness Dark
@sming
sming / IntelliJ-Shortcuts.md
Last active September 19, 2022 17:59
my fave IntelliJ shortcuts

POP-UP MENUS

  • ⌃⌘P - Show Editor Pop-Up Menu
  • ⇧⌘1 - Git Popup menu
  • ⇧⌘3 - Favorites Popup menu
  • ⇧⌥F - Favorites Popup menu
  • ⇧⌘3 - Editor Tab Popup menu
  • ⇧⌘4 - Goto Popup menu
  • ⇧⌘9 - Project Popup menu
#!/bin/bash
# Props to https://gist.github.com/kaleksandrov/3cfee92845a403da995e7e44ba771183 from whom I took the code inside
# the conditional.
THIS_SCRIPT_INVOCATION=$0
# The return status of this function will be 0 if globalprotect is running, 1 if not running because grep returns 0
# if it finds a match and 1 if not.
# We basically grep for globalprotect but exclude all the matches we don't want
@sming
sming / export-google-keep.py
Last active April 18, 2024 11:44
Simple script that exports Google Keep notes to a file called export-google-keep.py in the current directory
import keyring
import gkeepapi
################################################################
# Simple script that exports Google Keep notes to a file called
# export-google-keep.py in the current directory. A note will
# look like this:
# Hearthstone want list 2,☑ Aggro Druid common’s : Mark of the Lotus, power of the wild
# Rogue eviscerate, cold blood,
#
@sming
sming / cloudSettings
Last active December 26, 2021 20:35
Gist for VS Code Settings Sync
{"lastUpload":"2021-12-26T20:35:46.388Z","extensionVersion":"v3.4.3"}
@sming
sming / Node.java
Created November 12, 2016 12:03
* *** Bastille Agency coding test Part 3.*** * provide URL recommendations given a start node and a desired "distance" from that node.
package org.psk.playground;
/**
* *** Bastille Agency coding test Part 3.***
* Node class that holds references to 3 neighbours. Implements Comparable but this isn't currently used.
*/
public class Node implements Comparable<Node> {
@Override
public String toString() {
@sming
sming / Models.cs
Last active November 6, 2016 03:34
Bastille Agency Test
using System;
using System.Collections.Generic;
using System.Linq;
namespace Bastille
{
/// <summary>
/// Yes, pretty controversial using inheritance for code reuse! I personally think this approach is demonised unfairly. In giant projects,
/// it makes sense though - you need that extra insulation. Otherwise its been very convenient in my 20 years of development.
/// </summary>