Skip to content

Instantly share code, notes, and snippets.

Jeff Corcoran corcoran

Block or report user

Report or block corcoran

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
@corcoran
corcoran / pa-vol-down.sh
Created Aug 15, 2019
Pulseaudio vol mute/up/down scripts -- uses current sink -- let's you go above 100% volume. Relies on internal volume daemons for notifications (xfce4-volumed, etc)
View pa-vol-down.sh
#!/bin/bash
pactl -- set-sink-volume `pacmd stat | awk -F": " '/^Default sink name: /{print $2}'` -5%
View WebstormVuetifyCustomTagRegistration.js
import Vue from 'vue';
Vue.component('v-alert', {});
Vue.component('v-app', {});
Vue.component('v-autocomplete', {});
Vue.component('v-avatar', {});
Vue.component('v-badge', {});
Vue.component('v-bottom-nav', {});
Vue.component('v-bottom-sheet', {});
Vue.component('v-breadcrumbs', {});
@corcoran
corcoran / delete-evicted-pods-all-namespaces.sh
Created Dec 11, 2018 — forked from psxvoid/delete-evicted-pods-all-namespaces.sh
Delete evicted pods from all namespaces (also ImagePullBackOff and ErrImagePull)
View delete-evicted-pods-all-namespaces.sh
#!/bin/sh
# based on https://gist.github.com/ipedrazas/9c622404fb41f2343a0db85b3821275d
# delete all evicted pods from all namespaces
kubectl get pods --all-namespaces | grep Evicted | awk '{print $2 " --namespace=" $1}' | xargs kubectl delete pod
# delete all containers in ImagePullBackOff state from all namespaces
kubectl get pods --all-namespaces | grep 'ImagePullBackOff' | awk '{print $2 " --namespace=" $1}' | xargs kubectl delete pod
# delete all containers in ImagePullBackOff or ErrImagePull or Evicted state from all namespaces
@corcoran
corcoran / Controller.cs
Created Nov 24, 2018
Unity cube on touch
View Controller.cs
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Controller : MonoBehaviour
{
public GameObject cubePrefab;
// Use this for initialization
@corcoran
corcoran / admin.py
Last active Jul 11, 2018
Modify Inline FormSet in Django Admin after validation and before save
View admin.py
class InlineScreenshotFormSet(forms.models.BaseInlineFormSet):
def clean(self):
index = 0
for error in self._errors:
# If inline 'title' field is empty, fetch title from parent instead
if 'title' in error:
del self._errors[index]['title']
self.forms[index].instance.title = self.data['title']
self.forms[index].cleaned_data['title'] = self.data['title']
@corcoran
corcoran / Contract Killer 3.md
Created Aug 22, 2017 — forked from malarkey/Contract Killer 3.md
The latest version of my ‘killer contract’ for web designers and developers
View Contract Killer 3.md

Contract Killer

The popular open-source contract for web professionals by Stuff & Nonsense

  • Originally published: 23rd December 2008
  • Revised date: March 15th 2016
  • Original post

@corcoran
corcoran / crowdin.py
Created Jul 13, 2017
CrowdIn translations Android helper
View crowdin.py
#!/usr/bin/env python
import os
import shutil
import zipfile
# Fully translated only
translation_mapping = {
'cs': 'cs',
'de': 'de',
@corcoran
corcoran / CustomSnackbar.java
Last active Jul 18, 2019
Custom snackbar that forces rise/fall animations even with accessibility service
View CustomSnackbar.java
/*
* Copyright (C) 2015 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
View keybase.md

Keybase proof

I hereby claim:

  • I am corcoran on github.
  • I am blk_jack (https://keybase.io/blk_jack) on keybase.
  • I have a public key ASAt9N3dsSnerfRAczsmd8xTHhNKz000Sd1Mu4EMVRuB4Qo

To claim this, I am signing this object:

@corcoran
corcoran / ChromeTabsUtils.java
Created Oct 21, 2015 — forked from HellPie/ChromeTabsUtils.java
Utils for Android's CustomTabs Support Library
View ChromeTabsUtils.java
/*
* Copyright 2015 Diego Rossi (@_HellPie)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
You can’t perform that action at this time.