Skip to content

Instantly share code, notes, and snippets.

View nickautomatic's full-sized avatar

Nick F nickautomatic

View GitHub Profile
@nickautomatic
nickautomatic / cmder.md
Last active September 20, 2023 13:59
Setting up Cmder to use bash by default

Set up cmder to use msysgit / bash by default

  • Install cmder_mini (msysgit is already installed, so no need for full version)
  • In Cmder, open settings: Win + Alt + P
  • Under Startup > Tasks, add a task called {bash} with the following settings:
    • Task parameters (set icon):
      • For Cmder icon: /icon "%CMDER_ROOT%\cmder.exe"
      • For Git icon: /icon "C:\Program Files (x86)\Git\etc\git.ico"
    • Commands (open Git's bash shell):
  • "C:\Program Files (x86)\Git\bin\sh.exe" -l -new_console:d:%USERPROFILE%

What are Web Components?

Web Components are a new browser feature that provides a standard component model for the Web — WICG/web-components

<my-element>Hello</my-element>

A web native alternative to, eg. React and Vue.

@nickautomatic
nickautomatic / Package Control.sublime-settings
Last active December 9, 2019 18:02
Sublime Text - Installed Packages
{
"bootstrapped": true,
"in_process_packages":
[
],
"installed_packages":
[
"AdvancedNewFile",
"ApacheConf",
"Color Highlighter",
@nickautomatic
nickautomatic / Useful Linux commands
Last active September 27, 2019 15:53
Useful Linux commands
ack --sass "([\d\.]*)r?em" --output="\$1" -h | sort -u
Find all unique em and rem values in all Sass files below the current directory
cat / less
Output contents of a text file. ("less" is paginated but disappears after end of file, "cat" outputs in one go but output remains visible in console).
chown user:group /something
Changes owner of /something to 'user', group to 'group'.
cp
@nickautomatic
nickautomatic / settings.json
Created November 15, 2018 13:07
VS Code settings
{
"sublimeTextKeymap.promptV3Features": true,
"editor.multiCursorModifier": "ctrlCmd",
"editor.snippetSuggestions": "top",
"editor.formatOnPaste": true,
"git.path": "C:\\Program Files (portable)\\cmder\\vendor\\git-for-windows\\bin\\git.exe",
"terminal.integrated.shell.windows": "C:\\WINDOWS\\System32\\bash.exe",
"terminal.external.windowsExec": "ubuntu",
"workbench.colorTheme": "Afterglow Remastered",
"files.insertFinalNewline": true,
@nickautomatic
nickautomatic / Preferences.sublime-settings
Last active August 31, 2018 21:12
Sublime Text - User Settings
{
"bold_folder_labels": true,
"color_scheme": "Packages/Theme - Afterglow/Afterglow.tmTheme",
"default_line_ending": "unix",
"enable_tab_scrolling": false,
"ensure_newline_at_eof_on_save": true,
"file_exclude_patterns":
[
"*~",
"*.exe",
@nickautomatic
nickautomatic / command-line-stuff.md
Last active June 20, 2018 13:35
Command Line Bits & Pieces
@nickautomatic
nickautomatic / .aliases
Last active June 19, 2018 22:17
.aliases (for Bash on Ubuntu on Windows)
## Git
alias ga='git add'
alias gb='git branch --sort=-committerdate'
alias gbr="git for-each-ref --sort=-committerdate refs/heads --format='%(HEAD)%(color:yellow)%(refname:short)|%(color:bold green)%(committerdate:relative)|%(color:blue)%(subject)|%(color:magenta)%(authorname)%(color:reset)'|column -ts'|'"
alias gco='git checkout'
alias gcm='git commit -m'
alias gcv='git commit -v'
alias gd='git diff'
alias gl="git log -n 15 --graph --date-order --date=relative --pretty=format:'%C(red)%h%C(reset)%C(auto)%d%C(reset) %s %C(green)(%cr) %C(yellow) %an %C(reset)'"
alias gm='git merge'
@nickautomatic
nickautomatic / Default (Windows).sublime-keymap
Last active March 14, 2018 17:10
Sublime Text keymap (with shortcuts from jEdit)
[
// My Sublime shortcuts:
{ "keys": ["ctrl+k", "ctrl+m"], "command": "toggle_minimap" },
// jEdit shortcuts:
{ "keys": ["alt+d"], "command": "run_macro_file", "args": {"file": "Packages/Default/Delete Line.sublime-macro"} },
{ "keys": ["alt+right"], "command": "indent" },
{ "keys": ["alt+left"], "command": "unindent" },
{ "keys": ["ctrl+e", "ctrl+c"], "command": "toggle_comment", "args": { "block": false } },
{ "keys": ["ctrl+e", "ctrl+w"], "command": "close_all" },
@nickautomatic
nickautomatic / .visually-hidden
Last active February 28, 2018 06:21
Visually hidden / screen-reader only class
/* From Bootstrap 3 (I think...) */
.visually-hidden {
position: absolute;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0,0,0,0);
border: 0;