Skip to content

Instantly share code, notes, and snippets.

@-moz-document domain("amazon.co.uk"), domain("amazon.com"), domain("amazon.ca"), domain("amazon.de"), domain("amazon.it"), domain("amazon.es"), domain("amazon.fr"), domain("amazon.com.mx"), domain("amazon.co.jp"), domain("amazon.com.au"), domain("amazon.in")
{
body
{
font-size: 13px;
line-height: 19px;
color: #aaa !important;
font-family: 'Open Sans', Arial, sans-serif;
background-color: #1c1f26 !important;
}
// ==UserScript==
// @name YouTube Patch Collection
// @match https://www.youtube.com/*
// @icon https://www.youtube.com/favicon.ico
// @run-at document-start
// @grant none
// ==/UserScript==
// Attributes to remove from <html>
const ATTRS = [
@mhartington
mhartington / git-conventions.md
Last active December 10, 2021 17:40
Git Conventions

You've been working locally for awhile. You're ready to push some changes, but someone else pushed something! You have to pull in their changes before you can push yours.

git pull origin master forces you to create a merge commit, which is annoying.

Instead, do git pull --rebase origin master. This will effectively:

  1. Stash your changes
  2. Pull in the changes from origin
  3. Apply your changes on top

No merge commit!

function! s:expand_html_tab()
" try to determine if we're within quotes or tags.
" if so, assume we're in an emmet fill area.
let line = getline('.')
if col('.') < len(line)
let line = matchstr(line, '[">][^<"]*\%'.col('.').'c[^>"]*[<"]')
if len(line) >= 2
return "\<C-n>"
endif
async toggle() {
if (!this._playerModal) {
const { PlayerModalComponent } = await import( '../player-modal/player-modal.component');
this._playerModal = PlayerModalComponent;
}
const modalInstance = await this.modalCtrl.create({
component: this._playerModal,
swipeToClose: true,
cssClass: 'full-modal',
});
lspconfig.sumneko_lua.setup {
cmd = {
string.format(
"%s/nvim/nvim_lsp/sumneko_lua/lua-language-server/bin/macOS/lua-language-server",
"-E",
"%s/nvim/nvim_lsp/sumneko_lua/lua-language-server/main.lua",
cache_dir,
cache_dir
)
},
import {Component} from '@angular/core';
import {NavController, Modal, ViewController, TransitionOptions, Transition, Animation} from 'ionic-angular';
import {ModalPage} from '../modal/modal';
@Component({
templateUrl: 'build/pages/home/home.html'
})
export class HomePage {
constructor(private navCtrl: NavController) {
}
import {Directive, Attribute} from '@angular/core';
import {NgModel} from '@angular/common';
@Directive({
selector: '[mask]',
host: {
'(keyup)': 'onInputChange()'
}
})
export class Mask {
maskPattern: string;

Nullish

Before

  private readUrlEffect$ = this.route.queryParams.pipe(
    map(({ query }) =>
      this.searchForm.setValue({ search: !!query ? query ; '' })
    )
diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts
index 3c0cf79..ce873a3 100644
--- a/src/app/app-routing.module.ts
+++ b/src/app/app-routing.module.ts
@@ -7,7 +7,7 @@ const routes: Routes = [
loadChildren: () => import('./tabs/tabs.module').then(m => m.TabsPageModule)
},
{
- path: 'match-details/:id',
+ path: 'match-details',