Skip to content

Instantly share code, notes, and snippets.

Samuel Chan sammich

  • Sydney, Australia
Block or report user

Report or block sammich

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
@sammich
sammich / rules.md
Last active May 3, 2018
My 1Blocker Rules
View rules.md

Hide Page Elements

Fix msy.com.au

Domain: www.msy.com.au

Selector: .container .row .col-md-2[style]

Ads on 9to5mac

View cv.js
var items = this.context.binding.get('value').items,
html = '<table class="table table-sm table-bordered"><thead class="thead-default"><tr><th>Property</th><th>Value</th></tr></thead>';
html += items.map(function (i) {
var a;
try {
a = JSON.parse(i.value);
} catch (e) {
a = i.value;
}
@sammich
sammich / README.md
Last active Jun 22, 2017
A little helper script for working with Client-side Human Services
View README.md

CV Inspector

This is a script/bookmarklet to be used with IBM BPM Client-side Human services.

Getting Started

You have two options: as a userscript, or as a bookmarklet. I recommend the former.

Userscript

View README.md

word-fitter

This was originally a fiddle.

It's a dumb little thing I made after seeing a poster with 'fitted' text. It take a long corpus of text, and fits all that text within a certain width on screen, creating a poster/wall of text where each line perfectly fills the width of the column.

The fiddle [http://jsfiddle.net/Jx39q/1/].

@sammich
sammich / script.js
Created Jan 22, 2017
Find a CoachView by it's Control ID
View script.js
/**
* Returns the CoachView instance object for the control ID. To limit the scope of the search,
* provide a parent DOM Element or CoachView instance as the second argument.
*
* Note: Control IDs are not unique per page - this will return only the first CoachView with the
* supplied ControlID on the page or under the given parent.
*
* @param {string} controlId - control ID search target
* @param {Element | CoachView} [parent] - limit to CoachViews under this
@sammich
sammich / anz-xacts-to-tsv.js
Last active Dec 28, 2016
Simple script to use on your ANZ online banking to get a tab-delimited console output to paste into a spreadsheet
View anz-xacts-to-tsv.js
console.clear();
var text = [];
String.prototype.toTitleCase = function () {
return this.replace(/\w\S*/g, function(txt){return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase();});
};
$('.clickableTxnRow').each(function () {
var a = $(this);
@sammich
sammich / bpmdash.js
Created Apr 20, 2016
Sssssh...this is still a work in progress, and Sam hasn't decided if he should release it yet.
View bpmdash.js
var _ = (function () {
return {
// array
filter: array_filter
, last: array_last
, map: array_map
, pop: array_pop
, push: array_push
, unshift: array_unshift
@sammich
sammich / bpmdash.js
Created Apr 20, 2016
Sssssh...this is still a work in progress, and Sam hasn't decided if he should release it yet.
View bpmdash.js
var _ = (function () {
return {
// array
filter: array_filter
, last: array_last
, map: array_map
, pop: array_pop
, push: array_push
, unshift: array_unshift
View Hide Arstechnica comments below a threshold of total votes
$('.vote-positive').each(function (i, el) {
var pos = +el.textContent;
var neg = +$(el).siblings('.vote-negative').text()
var tot = pos + Math.abs(neg);
if (tot < 40) {
console.log(tot)
$(el).closest('li').css('opacity', 0.5)
}
@sammich
sammich / areadme.md
Last active Aug 29, 2015
Modifies the new MR Spy for...reasons
View areadme.md

New MR Spy Modifier

First off, I love the new forums that Arn and the team have put up. Vast improvement. And I'm also thankful that the Spy wasn't a porting afterthought and left for later to be released.

But I still have some suggestions that would make the Spy better. And most, if not all, of the suggestions are implemented in the attached UserScript newspy.user.js attached here.

The mod is made as the MR Spy was at 2015-06-23 0030 (AEST).

I 'built' and tested it on Chrome via the Tampermonkey extension. There's no reason why other UserScript extensions or Firefox won't be able to handle this either.

You can’t perform that action at this time.