Skip to content

Instantly share code, notes, and snippets.

View lewxdev's full-sized avatar

J. Lewis lewxdev

View GitHub Profile
@davzoku
davzoku / quick-notepad-in-browser.md
Created June 6, 2021 15:13
Use your browser as your notepad. Fuss-free!

Quick Notepad in Browser

Ever wish that you can turn your browser into a quick writing pad just to store some temporary strings of data?

This can be done by using the contenteditable attribute that is supported by most modern browser. Just copy the following code snippet in the browser omnibar and type away

Tip 1: save the following snippet as a bookmark and you can access it quickly via the bookmarks bar.

Tip 2: This should be used for temporary data that you don't mind losing. The notes will not be saved anywhere, unless you do a CTRL + S to save the webpage.

@thecodewarrior
thecodewarrior / App Icon Template.svg
Last active May 17, 2024 00:12
An SVG template for creating macOS app icons, including guides and the standard drop shadow
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mattetti
mattetti / newWindowsMachine.sh
Last active April 20, 2024 11:21
bash script to run from WSL to setup Windows and Linux from the linux side. To run: `wget https://gist.githubusercontent.com/mattetti/9807e2a1e654a7c00bb9c13f340fc39f/raw/ -O newMachineSetup.sh` and then `bash newMachineSetup.sh`
#!/bin/bash
export WINHOME=$(wslpath "$(wslvar USERPROFILE)")
# github username is needed to pull down the dot files
export GITHUBUSERNAME="mattetti"
# wininstall does an install using winget and checks that it went well
function wininstall {
echo "Installing $1";
cmd.exe /C winget.exe install -e $1;
@mrliptontea
mrliptontea / Good commit messages.md
Created March 5, 2019 11:00
Writing good commit messages

Good commit messages serve at least three important purposes:

  • To speed up the reviewing process.
  • To find out what changed in a range of commits (e.g. for a release note).
  • To help the future maintainers, say five years into the future, to find out why a particular change was made to the code or why a specific feature was added.

Structure your commit message like this:

/* preventScrollWhenSoftKeyboardAppearsIfThereIsPlentyOfRoom(event)
*
* Attach this handler to `touchstart` on any UI control that brings up the keyboard when you don't want iOS
* MobileSafari to scroll when a user taps it. Assumes that the input is near the top of the page and the user has
* not scrolled down (specific to my case, sorry!)
*
* requires top-level CSS directives so we can add it to the body:
* ```
* .prevent-ios-focus-scrolling {
* position: fixed;