Skip to content

Instantly share code, notes, and snippets.

Jonathan Welzel jnwelzel

Block or report user

Report or block jnwelzel

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View 2019-07-25-users-hate-change.md

'Users hate change'

This week NN Group released a video by Jakob Nielsen in which he attempts to help designers deal with the problem of customers being resistant to their new site/product redesign. The argument goes thusly:

  1. Humans naturally resist change
  2. Your change is for the better
  3. Customers should just get used to it and stop complaining

There's slightly more to it than that, he caveats his argument with requiring you to have of course followed their best practices on product design, and allows for a period of customers being able to elect to continue to use the old site, although he says this is obviously only a temporary solution as you don't want to support both.

@indiesquidge
indiesquidge / objects-over-classes.md
Last active Oct 31, 2019
We are better off avoiding ES6 classes in JavaScript when possible
View objects-over-classes.md

Plain JavaScript objects are better than classes when they can be used, and many popular modern frameworks have adopted their use.

Consider that in React a component can be created as either a class or as an object.

// using a class
class Welcome extends React.Component {
  render() {
    <h1>Hello, {this.props.name}</h1>
@redgeoff
redgeoff / index.html
Last active Sep 30, 2019
Pinch Zoom And Pan With HammerJS
View index.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport"
content="user-scalable=no, width=device-width, initial-scale=1, maximum-scale=1">
<title>Pinch Zoom</title>
</head>
<body>
@benlinton
benlinton / multiple_mysql_versions_for_development.md
Last active Nov 9, 2019
Multiple MySQL Versions with Homebrew
View multiple_mysql_versions_for_development.md

Multiple MySQL Versions for Development

Options included below:

  • Using Docker docker-compose
  • Using Homebrew brew

Using Docker (recommended)

This gist was originally created for Homebrew before the rise of Docker, yet it may be best to avoid installing mysql via brew any longer. Instead consider adding a barebones docker-compose.yml for each project and run docker-compose up to start each project's mysql service.

@gaearon
gaearon / combining.js
Created Jun 3, 2015
Combining Stateless Stores
View combining.js
// ------------
// counterStore.js
// ------------
import {
INCREMENT_COUNTER,
DECREMENT_COUNTER
} from '../constants/ActionTypes';
const initialState = { counter: 0 };
@darioblanco
darioblanco / TransactionMockFuckTest.java
Last active Jul 10, 2018
Mock a Jedis transaction with mockito
View TransactionMockFuckTest.java
import redis.clients.jedis.Client;
import redis.clients.jedis.Jedis;
import redis.clients.jedis.Transaction;
import org.testng.annotations.*;
import static org.mockito.Mockito.*;
public class TransactionMockFuckTest {
/**
* Let's say we want to test the following method
@TSiege
TSiege / The Technical Interview Cheat Sheet.md
Last active Nov 21, 2019
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.
View The Technical Interview Cheat Sheet.md

ANNOUNCEMENT

I have moved this over to the Tech Interview Cheat Sheet Repo since a gist is too difficult to maintain as an open source endevaor and there is no way to version it. I have updated below, but I will not be able to keep this one up to date so please checkout the repo instead. The below is just for some preservation for those who stumble across here.






\

@mgajdos
mgajdos / update-jersey-in-gf.sh
Last active Jun 17, 2017
Update Jersey in GlassFish 4.0.1
View update-jersey-in-gf.sh
#!/bin/bash
JERSEY_VERSION=2.5.1
HK2_VERSION=2.2.0-b26
JAVASSIST_VERSION=3.18.1-GA
MODULES_DIR=`pwd`/modules
OSGI_CACHE_DIR=`pwd`/domains/domain1/osgi-cache/felix
processArtifact() {
@bhollis
bhollis / blog.js.coffee
Last active Aug 21, 2017
A simple, made-up example of the code for a simple AngularJS blog viewer as a more detailed exploration of http://benhollis.net/blog/2014/01/17/cleanly-declaring-angularjs-services-with-coffeescript/ . Yes, I know about `$resource`, but I prefer not to use it.
View blog.js.coffee
app = angular.module 'BlogExample', []
# Simple controller that loads all blog posts
app.controller 'BlogCtrl', ['$scope', 'Blog', ($scope, Blog) ->
# Get all the blog posts
Blog.all().then (posts) ->
$scope.posts = posts
# Extend the $scope with our own properties, all in one big block
# I like this because it looks like declaring a class.
You can’t perform that action at this time.