Skip to content

Instantly share code, notes, and snippets.

View codingthat's full-sized avatar

Kevin Bloch (@codingthat) codingthat

View GitHub Profile
@codingthat
codingthat / asana-custom-view.js
Last active January 28, 2021 15:08
Asana custom list view: Automatically set filter to "just my tasks," make columns narrower, make rows shorter, and hide assignee and enum fields
// intended as a Violentmonkey script (you'll need "// @grant GM_addStyle") so that it automatically runs
// update: now re-runs even as you click around other tabs and projects within Asana
// update: now auto-scrolls to the subtasks section and adds a back button there for easier task hierarchy navigation
// update: a second back button also appears at the bottom for convenience. it breaks the "Add Subtask" button, but
// as a workaround you can just click in the last subtask and hit Enter
// fix: back button also works after drilling until there are no more subtasks
// fix: escaping out of a task and going back into the same task scrolls to subtasks
// fix: work with apparent change from 'small' to 'medium' buttons 2020Dec10 (but backwards-compatible)
@codingthat
codingthat / trello-make-errors-huge.js
Last active May 6, 2020 07:49
Bookmarklet to make Trello errors absurdly big (if also unreadable) so they're impossible to miss
javascript:(function () {
const notification_element = document.getElementById('notification');
notification_element.style.cssText = 'position: static; left: 0;';
const set_errors_huge = (a,b) => {
const huge_css = `
display: block;
min-width: 100%;
max-width: 100%;
@codingthat
codingthat / trello-auto-midnight-all-but-meetings.js
Last active February 11, 2021 08:34
Bookmarklet to automatically set Trello card times to just before midnight whenever the due date is accessed...unless they're in a column called "Meetings"
javascript:(function () {
const set_time_to_midnight = (a,b) => {
if (!document.querySelector('.js-open-move-from-header')
|| document.querySelector('.js-open-move-from-header').innerText === 'Meetings'
|| !document.querySelector('.js-dpicker-time-input')) return;
document.querySelector('.js-dpicker-time-input').value = '11:59 PM'
};
const config = { childList: true, subtree: true };
Computer Information:
Manufacturer: Unknown
Model: Unknown
Form Factor: Laptop
No Touch Input Detected
Processor Information:
CPU Vendor: GenuineIntel
CPU Brand: Intel(R) Core(TM) i5-4210U CPU @ 1.70GHz
CPU Family: 0x6
@codingthat
codingthat / i-am-real.md
Created May 23, 2019 14:28
Vote for my verification please
@codingthat
codingthat / Machine.sol
Last active September 28, 2020 10:15 — forked from michalmikolajczyk/Machine.sol
Smart Contract to represent a machine on blockchain, with basic rental interface
pragma solidity ^0.4.18;
import '../node_modules/zeppelin-solidity/contracts/token/ERC20Basic.sol';
import '../node_modules/zeppelin-solidity/contracts/token/SafeERC20.sol';
/**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/
@codingthat
codingthat / word_realms_mods.sh
Created September 24, 2017 08:43
Update to word_realms_mods.sh that helps it find your swf on Linux Mint
#!/bin/bash
echo "Welcome to word-realms-mods version 0.995"
checkfile () {
if [ ! -f "$1" ]; then
echo "$1 not found! We need that."
return 1
fi
return 0
}
p () {
@codingthat
codingthat / forecaster.sql
Created August 22, 2017 08:52
Easy home budget forecaster
--
-- PostgreSQL database dump
--
--
-- TOC entry 185 (class 1255 OID 5154394)
-- Name: in_month(date, date); Type: FUNCTION; Schema: public; Owner: -
--
CREATE FUNCTION in_month(d date, month_start date) RETURNS boolean
@codingthat
codingthat / pr.sh
Created April 19, 2017 09:09
Quick merge of upstream pull request
git clone (my fork url here)
cd (repo name here)
git remote add (upstream url here)
pr() { git fetch upstream pull/$1/head:pr$1 && git merge --commit pr$1; }
# now you're set. Pick your PRs, say 1, 2, and 55:
pr 1 # fetch, merge, and autocommit upstream's Pull Request #1
pr 2 # same for PR #2
pr 55 # etc.