Skip to content

Instantly share code, notes, and snippets.

View tylerlwsmith's full-sized avatar

Tyler Smith tylerlwsmith

View GitHub Profile
@mahemoff
mahemoff / README.md
Last active April 6, 2024 00:38
Vim Terminal Mode - A short introduction

Vim has a Terminal Mode!

Since v8.1 (May 2018), Vim has shipped with a built-in terminal. See https://vimhelp.org/terminal.txt.html or type :help terminal for more info.

Why use this? Mainly because it saves you jumping to a separate terminal window. You can also use Vim commands to manipulate a shell session and easily transfer clipboard content between the terminal and files you're working on.

Key Bindings

@jaredpalmer
jaredpalmer / react-scripts+3.4.1.patch
Created May 26, 2020 14:46
Speed up Create React App with TypeScript in development
diff --git a/node_modules/react-scripts/config/webpack.config.js b/node_modules/react-scripts/config/webpack.config.js
index 25840d9..25c3c41 100644
--- a/node_modules/react-scripts/config/webpack.config.js
+++ b/node_modules/react-scripts/config/webpack.config.js
@@ -172,7 +172,7 @@ module.exports = function(webpackEnv) {
// The build folder.
path: isEnvProduction ? paths.appBuild : undefined,
// Add /* filename */ comments to generated require()s in the output.
- pathinfo: isEnvDevelopment,
+ pathinfo: false,
@micheam
micheam / codesandbox.html
Last active January 18, 2022 02:06
Hugo shortcode for CodeSandbox Embed.
{{ $defaultWidth := "100%" }}
{{ $defaultHeight := "500px" }}
{{ if .IsNamedParams }}
<iframe
src="https://codesandbox.io/embed/{{ .Get "id" }}?codemirror=1&fontsize=13&hidenavigation=1&theme=dark&view=preview"
style="width:{{ with .Get "width" }}{{.}}{{ else }}100%{{ end }}; height:{{ with .Get "height" }}{{.}}{{ else }}{{ $defaultHeight }}{{ end }}; border:0; border-radius: 4px; overflow:hidden;"
title="{{ with .Get "title" }}{{.}}{{ else }}{{ .Get "id" }}{{ end }}"
allow="geolocation; microphone; camera; midi; vr; accelerometer; gyroscope; payment; ambient-light-sensor; encrypted-media; usb"
sandbox="allow-modals allow-forms allow-popups allow-scripts allow-same-origin"
@AfroThundr3007730
AfroThundr3007730 / no-wsj-paywall.user.js
Created June 7, 2019 20:40
Attempts to show the non-paywalled version of Wall Street Journal articles
// ==UserScript==
// @name Remove WSJ Paywall
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Attempts to show the non-paywalled version of Wall Street Journal articles
// @author AfroThundr
// @include https://www.wsj.com/articles/*
// @grant none
// @run-at document-start
// ==/UserScript==
@rufoa
rufoa / Jenkinsfile
Created May 13, 2019 02:29
Jenkins [skip ci] implementation for multi-branch declarative pipeline
// change 'agent' lines as appropriate
pipeline {
agent none
stages {
stage('Run CI?') {
agent any
steps {
@dogterbox
dogterbox / controller.py
Created April 20, 2019 19:07
python MVC with tkinter
import tkinter as Tk
from models import Model
from views import View
class Controller():
def __init__(self):
self.root = Tk.Tk()
self.model = Model()
# Pass to view links on root frame and controller object
@astoilkov
astoilkov / readme.md
Last active March 13, 2024 10:19
Async Operations with useReducer Hook

Async Operations with useReducer Hook

9 March, 2019

We were discussing with @erusev what we can do with async operation when using useReducer() in our application. Our app is simple and we don't want to use a state management library. All our requirements are satisfied with using one root useReducer(). The problem we are facing and don't know how to solve is async operations.

In a discussion with Dan Abramov he recommends Solution 3 but points out that things are fresh with hooks and there could be better ways of handling the problem.

Problem

@samdenty
samdenty / README.MD
Last active November 11, 2021 04:57
VS Code CSS addition to increase readability on file tree.

How to install

Custom CSS plugin

Install the custom CSS plugin, then make a file on your computer that will hold your custom CSS, I like to make one in my home directory called ~/.vscodestyles.css and then add the CSS into it.

Once done, open your command palette and select enable custom CSS and JS

From http://www.agcs.com/patterns/papers/respat.htm
Resign Patterns
Ailments of Unsuitable Project-Disoriented Software
by
Michael Duell
mitework@yercompany.com
Abstract
@anschaef
anschaef / bootstrap-4-sass-mixins-cheat-sheet.scss
Last active April 12, 2024 08:49
Bootstrap 4 Sass Mixins [Cheat sheet with examples]
/* -------------------------------------------------------------------------- */
// All Bootstrap 4 Sass Mixins [Cheat sheet]
// Updated to Bootstrap v4.5.x
// @author https://anschaef.de
// @see https://github.com/twbs/bootstrap/tree/master/scss/mixins
/* -------------------------------------------------------------------------- */
/*
// ########################################################################## */
// New cheat sheet for Bootstrap 5: