Skip to content

Instantly share code, notes, and snippets.

nmccready nmccready

Block or report user

Report or block nmccready

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
@nmccready
nmccready / disable_vim_auto_visual_on_mouse.txt
Created Nov 22, 2019 — forked from u0d7i/disable_vim_auto_visual_on_mouse.txt
Disable vim automatic visual mode on mouse select
View disable_vim_auto_visual_on_mouse.txt
Disable vim automatic visual mode on mouse select
issue: :set mouse-=a
add to ~/.vimrc: set mouse-=a
@nmccready
nmccready / install-gradle-centos.sh
Created Jul 23, 2019 — forked from parzonka/install-gradle-centos.sh
Install gradle on redhat/centos linux
View install-gradle-centos.sh
# installs to /opt/gradle
# existing versions are not overwritten/deleted
# seamless upgrades/downgrades
# $GRADLE_HOME points to latest *installed* (not released)
gradle_version=2.9
wget -N https://services.gradle.org/distributions/gradle-${gradle_version}-all.zip
sudo unzip -foq gradle-${gradle_version}-all.zip -d /opt/gradle
sudo ln -sfn gradle-${gradle_version} /opt/gradle/latest
sudo printf "export GRADLE_HOME=/opt/gradle/latest\nexport PATH=\$PATH:\$GRADLE_HOME/bin" > /etc/profile.d/gradle.sh
. /etc/profile.d/gradle.sh
View 1-macOS-10.12-sierra-setup.md

macOS 10.12 Sierra Setup

Custom recipe to get macOS 10.12 Sierra running from scratch, setup applications and developer environment. This is very similar (and currently mostly the same) as my 10.11 El Capitan setup recipe and 10.10 Yosemite setup recipe. I am currently tweaking this for 10.12 Sierra and expect to refine this gist over the next few weeks.

I use this gist to keep track of the important software and steps required to have a functioning system after a semi-annual fresh install. I generally reinstall each computer from scratch every 6 months, and I do not perform upgrades between releases.

This keeps the system performing at top speeds, clean of trojans, spyware, and ensures that I maintain good organizational practices for my content and backups. I highly recommend this.

You are encouraged to fork this and modify it to your heart's content to match your o

@nmccready
nmccready / submodule-pull.sh
Created Jan 22, 2018 — forked from stephenparish/submodule-pull.sh
Update submodules in a git repository to the latest, but exclude one..
View submodule-pull.sh
git submodule foreach '[ "$path" == "submodule-to-exclude" ] || git pull origin master'
@nmccready
nmccready / gv-delete-history-legacy.user.js
Created May 12, 2017 — forked from gavinhungry/gv-delete-history-legacy.user.js
Browser userscripts to delete all Google Voice history
View gv-delete-history-legacy.user.js
// ==UserScript==
// @name Delete Google Voice (Legacy) History
// @description Deletes all Google Voice (Legacy) history
// @version 1.1.0
// @license MIT
// @namespace gavinhungry.io
// @author Gavin Lloyd <gavinhungry@gmail.com>
//
// @include https://www.google.tld/voice
// @include https://www.google.tld/voice/*
@nmccready
nmccready / dev.js
Created Mar 13, 2017 — forked from remy/dev.js
A webpack config with dynamic loader to be used with React
View dev.js
// filename: lib/dev.js
const webpackDevMiddleware = require('webpack-dev-middleware');
const webpackHotMiddleware = require('webpack-hot-middleware');
const webpack = require('webpack');
// expects to live in ./lib
const config = Object.assign({}, require('../webpack.config.dev'), {
// customisations that were typically off, but I could turn on during experiments
});
@nmccready
nmccready / hook_stdout.coffee
Last active Oct 11, 2016 — forked from bsatrom/hook_stdout.coffee
Samples for hooking into STDOUT for unit testing in Node.js
View hook_stdout.coffee
exports = module.exports
exports.setup = (callback) ->
write = process.stdout.write
process.stdout.write = ((stub) ->
(string, encoding, fd) ->
stub.apply process.stdout, arguments
callback string, encoding, fd)(process.stdout.write)
@nmccready
nmccready / index.html
Created Jul 27, 2016 — forked from anonymous/index.html
textarea fill height // source http://jsbin.com/siyene
View index.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
<style id="jsbin-css">
html,
body {
height: 100%;
View gist:7955794

Asynchronicity is the price to pay, you better know what you're paying for...

Let's share some vocabulary first:

Thread: The primitive responsible of executing code on the processor, you can give an existing (or a new) Thread some code, and it will execute it. Normally you can have a few hundreds on a JVM, arguments that you can tweak your way out to thousands. Worth noting that multitasking is achieved when using multiple Threads. Multiple Threads can exist for a single processor in which case multitasking happens when this processor switches between threads, called context switching, which will give the impression of things happenning in parallel. An example of a direct, and probably naive, use of a new Thread in Java:

public class MyRunnable implements Runnable {
  public void run(){
    System.out.println("MyRunnable running");
You can’t perform that action at this time.