Skip to content

Instantly share code, notes, and snippets.

View mikedfunk's full-sized avatar

Mike Funk mikedfunk

View GitHub Profile
@mikedfunk
mikedfunk / couchbase-userscript.user.js
Last active April 21, 2018 05:38
Couchbase userscript
// ==UserScript==
// @name Couchbase authentication fix
// @description Fixes couchbase's inability to save password.
// @include http://couch.local.*.com/ui/index.html*
// @include http://couch*.*.aws.*.com:*/ui/index.html*
// @version 1.0
// ==/UserScript==
function fixAutoComplete () {
setTimeout(function () {
# https://www.gnu.org/software/gettext/manual/html_node/envsubst-Invocation.html
envsubst < /etc/nginx/conf.d/mysite.template > /etc/nginx/conf.d/default.conf
@mikedfunk
mikedfunk / lsof.bash
Created October 20, 2016 21:51
find what process is using a port
#!/bin/bash
# find what process is using a port
lsof -i :8080
$options = array_filter($this->updateData, array($this, 'isValidEvent'));
<?php
require_once dirname(__DIR__) . '/QueueProcessAbstract.php';
abstract class Solr_QueueIndexAbstract extends QueueProcessAbstract
{
/** @var string */
private $core = 'default';
public function __construct()
@mikedfunk
mikedfunk / gist:538561131967927c5924
Last active March 23, 2016 22:31
art advisory random email
/**
* Submit the art advisory brief form with a random email variant
* Use this to bookmarkletize it https://ted.mielczarek.org/code/mozilla/bookmarklet.html
*/
// first part of your email
var myname = 'mike.funk';
// skip most things
$('#a01-0').click();
@mikedfunk
mikedfunk / gist:2211fc29991da868da17
Last active March 23, 2016 22:31
art advisory same email
/**
* Submit the art advisory brief form with the same email
* Use this to bookmarkletize it https://ted.mielczarek.org/code/mozilla/bookmarklet.html
*/
// first part of your email
var myname = 'mike.funk';
// skip most things
$('#a01-0').click();
" vim: set sw=2 ts=2 sts=2 et tw=78 foldmethod=marker filetype=vim:
" color scheme {{{
if (has('nvim'))
colo gotham
else
colo gotham256
endif
" }}}
" php-cs-fixer {{{
<?xml version="1.0"?>
<ruleset name="Saatchi Coding Standard">
<description>The coding standard for Saatchi Art</description>
<exclude-pattern>*/vendor/*</exclude-pattern>
<rule ref="PSR2">
<!-- allow if ( ! $myvar) like Sergey prefers -->
<exclude name="PSR2.ControlStructures.ControlStructureSpacing"/>
</rule>
- repo: git@github.com:pre-commit/pre-commit-hooks
sha: v0.4.2
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-json
- id: check-yaml
- id: check-merge-conflict
- repo: git@github.com:Lucas-C/pre-commit-hooks.git