Skip to content

Instantly share code, notes, and snippets.

View kgust's full-sized avatar

Kevin Gustavson kgust

  • Vanderbilt University Medical Center
  • Nashville, Tennessee USA
View GitHub Profile
@kgust
kgust / dark.md
Created December 4, 2018 18:01 — forked from a7madgamal/dark.md
Dark mode for Slack on MacOS
  1. Close slack
  2. Open this file /Applications/Slack.app/Contents/Resources/app.asar.unpacked/src/static/ssb-interop.js
  3. Append this to it
document.addEventListener('DOMContentLoaded', function() {
 $.ajax({
   url: 'https://cdn.rawgit.com/laCour/slack-night-mode/master/css/raw/black.css',
   success: function(css) {
 $("").appendTo('head').html(css);
@kgust
kgust / php-phpdbg-proxy.sh
Created November 29, 2018 13:39 — forked from VeryStrongFingers/php-phpdbg-proxy.sh
PHPStorm - PHP-PHPDBG Interpreter proxy
#!/bin/bash
#### Dirty/Fake PHP Interpreter to trick PHPStorm into using PHPDBG for running tests with/without code coverage
## For Mac/Linux only, Window's ubuntu subsystem theoretically would work too
##
##
## Related JetBrain's issues/feature requests
## https://youtrack.jetbrains.com/issue/WI-21414
## https://youtrack.jetbrains.com/issue/WI-29112
##
/* See also https://github.com/sebastianbergmann/php-jenkins-template/issues/127 */
pipeline {
agent any
stages {
stage('Prepare') {
steps {
sh 'composer install'
sh 'rm -rf build/api'
sh 'rm -rf build/coverage'
@kgust
kgust / trello-css-guide.md
Created November 9, 2016 21:31 — forked from bobbygrace/trello-css-guide.md
Trello CSS Guide

Hello, visitors! If you want an updated version of this styleguide in repo form with tons of real-life examples… check out Trellisheets! https://github.com/trello/trellisheets


Trello CSS Guide

“I perfectly understand our CSS. I never have any issues with cascading rules. I never have to use !important or inline styles. Even though somebody else wrote this bit of CSS, I know exactly how it works and how to extend it. Fixes are easy! I have a hard time breaking our CSS. I know exactly where to put new CSS. We use all of our CSS and it’s pretty small overall. When I delete a template, I know the exact corresponding CSS file and I can delete it all at once. Nothing gets left behind.”

You often hear updog saying stuff like this. Who’s updog? Not much, who is up with you?

@kgust
kgust / client.js
Created November 8, 2016 02:43 — forked from davidgilbertson/client.js
Node http vs net modules
// This makes two connections, one to a tcp server, one to an http server (both in server.js)
// It fires off a bunch of connections and times the response
// Both send strings.
const net = require(`net`);
const http = require(`http`);
function parseIncomingMessage(res) {
return new Promise((resolve) => {
@kgust
kgust / README.md
Last active May 29, 2019 13:02 — forked from ralphschindler/README.md
Docker For Mac - De-facto Host Address Alias (10.254.254.254) - "The 10254 Trick".

Docker (Mac) De-facto Standard Host Address Alias

This launchd script will ensure that your Docker environment on your Mac will have 10.254.254.254 as an alias on your loopback device (127.0.0.1). The command being run is ifconfig lo0 alias 10.254.254.254

Installation

Copy/Paste the following in terminal with sudo (must be root as the target directory is owned by root)...

sudo curl -o /Library/LaunchDaemons/info.kevingustavson.docker_10254_alias.plist https://gist.github.com/kgust/3fe1ae7420e2b35ed3b40eb3feef4efe/raw/info.kevingustavson.docker_10254_alias.plist
@kgust
kgust / gpg-agent.conf
Created April 12, 2016 15:20 — forked from nl5887/gpg-agent.conf
Using GPG Agent on OS-X
launchctl unload -w -S Aqua /System/Library/LaunchAgents/gpg.agent.daemon.plist
launchctl load -w -S Aqua /System/Library/LaunchAgents/gpg.agent.daemon.plist
@kgust
kgust / LICENSE
Last active August 29, 2015 14:27 — forked from ourmaninamsterdam/LICENSE
Arrayzing - The JavaScript array cheatsheet
The MIT License (MIT)
Copyright (c) 2015 Justin Perry
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
@kgust
kgust / tmux.md
Last active August 29, 2015 14:15 — forked from andreyvit/tmux.md

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

remap prefix to Control + a

@kgust
kgust / vim.svg
Last active August 29, 2015 14:11 — forked from sjl/vim.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.