Skip to content

Instantly share code, notes, and snippets.

View klamping's full-sized avatar

Kevin Lamping klamping

View GitHub Profile
@wallw-teal
wallw-teal / macos-setup.md
Last active September 13, 2022 16:59
MacOS Setup

Installation

Note that most of the Settings/Preferences-specific items are just that: preference. Feel free to play around and find something you like.

  • Get rid of just about everything in the dock (if you need something less often, use cmd+space and type the name of the thing)
  • Open Safari, copy instructions for installing brew
  • Open Terminal (via cmd+space), paste
    • While that is doing its thing, poke around in settings:
      • Dark mode
  • Quicker screen saver delay
@kentcdodds
kentcdodds / eslint-changed.sh
Last active April 15, 2021 03:36
Shell script to lint only changed files to be used as a githook (specific to my project)
#!/usr/bin/env bash
set -e
# allow being run from somewhere other than the git rootdir
gitroot=$(git rev-parse --show-cdup)
# default gitroot to . if we're already at the rootdir
gitroot=${gitroot:-.};
nm_bin=$gitroot/node_modules/.bin
@rupl
rupl / .gitignore
Last active February 12, 2016 07:23
WebDriverCSS + BrowserStack + local server
# Avoid saving full screenshots and failed comparisons, but always save selector-based references.
visual/failed/*
visual/reference/*
!visual/reference/*baseline*
Busymind Mindfulness for your busy life
Slow down. Search your body for tension.
This could be at your shoulders, your back, or your mouth.
Release the tension let your body sink in to relaxation.
Now focus on your breath.
As you breath, feel your chest expand and contract. Feel the air move in and out.
@jewelia
jewelia / gist:0b8f26e91f2818bef460
Last active August 29, 2015 14:15
3 Great Engineering Management Talks from 2014

General key themes:

  • Hiring is really hard. You’re not just hiring a “Rails Engineer” or a “Python Programmer” you’re hiring someone who can help you change the world. Tell them why! Talk about the hard problems you’re solving. 2/3 of these talks give ideas and insight into hiring from sourcing to actual interview processes.

  • Rewriting systems is hard. People think they are going to replace their broken down horse and buggie with a bullet train and this often ends up in disaster. Successful rewrites require an incremental approach that takes months/years and often runs way over schedule. 2/3 of these talks go over how to handle rewrites not only from a high level technical perspective but a cultural/management perspective as well.

Two Developers, Many Lines of Code, and A Campaign that Made History

Harper Reed (CTO of Obama for America, now CEO of Modest) and Dylan Richard (Director of Eng of Obama for America, now CTO of Modest)

@mpgilbertusa
mpgilbertusa / simple-style-guide
Created November 10, 2014 17:53
Simple Style Guide
<section>
<div class="box caption outline-pad">
<span data-picture data-alt="Alt text here, unless image is decorative.">
<span data-src="http://placehold.it/700x200&text=Responsive+Image+(700+x+200)"></span>
<span data-src="http://placehold.it/1000x300&text=Responsive+Image+(1000+x+300)" data-media="(min-width: 700px)"></span>
<!--[if (lt IE 9) & (!IEMobile)]>
<span data-src="http://placehold.it/1000x300&text=IE+Fallback+Image+(1000+x+300)"></span>
<![endif]-->
<!-- Fallback content for non-JS browsers. Same img src as above. -->
@katowulf
katowulf / module.simpleLoginTools.js
Last active March 3, 2016 04:26
A service and several directives based on ng-cloak, which wait for angularFire to finish authenticating--rather than just until Angular bootstraps--before displaying it's content. Handy to get rid of those blips that display when user isn't logged in--oh, wait, now they are.
'use strict';
/**
* This module monitors angularFire's authentication and performs actions based on authentication state.
* directives/directive.ngcloakauth.js depends on this file
*
* Modify ng-cloak to hide content until FirebaseSimpleLogin resolves. Also
* provides ng-show-auth methods for displaying content only when certain login
* states are active.
*
@bittersweetryan
bittersweetryan / gist:6142060
Last active December 20, 2015 13:49
Tips and Tricks for testing JavaScript

#JavaScript Unit Testing Tips and Tricks#

###Please add your your tips and tricks for unit testing JavaScript as comments to this gist. I'll pull them into the main text and credit your contribution.###


  • Create/use snippits to scaffold testing methods ( i.e. if you are using BDD scaffold describe and it methods)
  • Write tests with the same care as production code
  • DRY. Factor out repeated code into methods
@kentcdodds
kentcdodds / README.md
Last active December 19, 2015 10:29
How to check whether an external resource loaded and load a local copy if it failed to load. See README.md

Double Take Script Loader

This has been moved to an official Git repository

@harthur
harthur / snippet.md
Created June 18, 2012 22:12
console.log() key binding for Sublime Text

Go to Sublime Text 2 > Preferences > Key Bindings - User and add this JSON to the file:

[
    { "keys": ["super+shift+l"],
      "command": "insert_snippet",
      "args": {
        "contents": "console.log(${1:}$SELECTION);${0}"
      }
 }