Skip to content

Instantly share code, notes, and snippets.

View emmet.vim
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
View dynamic-modal.ts
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',
});
View amazon.css
@-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;
}
View lsp.lua
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
)
},
View changes.md

Nullish

Before

  private readUrlEffect$ = this.route.queryParams.pipe(
    map(({ query }) =>
      this.searchForm.setValue({ search: !!query ? query ; '' })
    )
View tabs.diff
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',
View edits.diff
diff --git a/src/app/app.module.ts b/src/app/app.module.ts
index bf2002c..17309c0 100644
--- a/src/app/app.module.ts
+++ b/src/app/app.module.ts
@@ -8,21 +8,15 @@ import { StatusBar } from '@ionic-native/status-bar/ngx';
import { AppComponent } from './app.component';
import { AppRoutingModule } from './app-routing.module';
-import { PopoverSrviceService } from './popover-srvice.service';
-import {PopoverModalComponent} from './popover-modal/popover-modal.component'
View deck.js
import React from 'react';
import { Router, globalHistory, Location } from '@reach/router';
import { Global } from '@emotion/core';
import { ThemeProvider } from 'theme-ui';
import { Helmet } from 'react-helmet';
import get from 'lodash.get';
import merge from 'lodash.merge';
import useKeyboard from 'gatsby-theme-mdx-deck/src/hooks/use-keyboard';
import useStorage from 'gatsby-theme-mdx-deck/src/hooks/use-storage';
import useDeck from 'gatsby-theme-mdx-deck/src/hooks/use-deck';
View scratch.ts
export function serveCordova(
options: CordovaServeBuilderSchema,
context: BuilderContext
): Observable<DevServerBuilderOutput> {
const { devServerTarget, port, host, ssl } = options;
const root = context.workspaceRoot;
const devServerTargetSpec = targetFromTargetString(devServerTarget);
async function setup() {
View index.ts
export function serveCordova(
options: CordovaServeBuilderSchema,
context: BuilderContext
): Observable<DevServerBuilderOutput> {
const { devServerTarget, port, host, ssl } = options;
const root = context.workspaceRoot;
const devServerTargetSpec = targetFromTargetString(devServerTarget);
async function setup() {