Skip to content

Instantly share code, notes, and snippets.

View nickautomatic's full-sized avatar

Nick F nickautomatic

View GitHub Profile

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 / 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 / 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 / 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%
@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 / breakpoint.scss
Created March 10, 2015 16:19
Super-simple breakpoint mixin
// Super simple mobile-first breakpoint mixin:
@mixin breakpoint($from) {
@media screen and (min-width: $from) { @content; }
}
// Example usage:
$small: 480px;
nav {
@include breakpoint($small) {
display: none;
@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;
@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",
## Global variables:
export PATH=/c/Program\ Files/cwRsync/:/c/Users/Nick/AppData/Roaming/npm/:$PATH
export VAGRANT_HOME=/c/HashiCorp/Vagrant/.vagrant.d/
## Custom Bash Prompt:
export PS1='\[\033]0;$MSYSTEM:${PWD//[^[:ascii:]]/?}\007\]\n\[\033[32m\]\u@\h \[\033[33m\]\w\[\033[36m\]`__git_ps1`\[\033[0m\]\n$ '
## For nice diffs:
# install diff-so-fancy (npm -g diff-so-fancy)
# set pager to use it (git config --global core.pager "diff-so-fancy | less --tabs=4 -RFX")