Skip to content

Instantly share code, notes, and snippets.

// ==UserScript==
// @name Make timesheet item selector wider
// @namespace https://portable.com.au/
// @version 0.1
// @description it small
// @author Andrew Fulton
// @match https://app.mavenlink.com/timesheets
// @icon https://www.google.com/s2/favicons?sz=64&domain=tampermonkey.net
// @grant none
// @run-at document-end
@andrewfulton
andrewfulton / slack.ts
Created June 15, 2021 10:45
Slack API utility function(s)
import axios from 'axios';
const slaxios = axios.create({
baseURL: 'https://slack.com/api/',
headers: {
Authorization: `Bearer ${process.env.SLACK_TOKEN}`,
},
});
type EmojiListSlackResponse = {
A Programmer
I am a god
it broke -> No idea what Im doing
No idea what Im doing
it works -> I am a god
@andrewfulton
andrewfulton / App.jsx
Created August 25, 2019 02:19
I feel like I am so close to getting this...
import React, { useState, useCallback, useMemo } from 'react';
// Everyone loves an increment clicker component.
const Component = ({ id, value, onClick}) => {
console.log(`Hello lets render component ${id}`);
return (
<label>{value}
<button onClick={onClick}>Click</button>
</label>
File Chooser
Empty
Change -> Choosing
Choosing
Cancel -> Empty
Choose -> Selected
Selected
Change -> Choosing
Remove -> Empty
@andrewfulton
andrewfulton / README.md
Created May 11, 2019 23:22
Debug setup for node/VSCode

Works for generally running node script and inside express etc callbacks.

Need to make sure that port in launch.json and --inspect-brk=X in package.json match.

Keybase proof

I hereby claim:

  • I am andrewfulton on github.
  • I am andrewfulton (https://keybase.io/andrewfulton) on keybase.
  • I have a public key ASByGChCvt5heHAFBn9mqevV4SmmnIRRxxMiD5ueLN2lnQo

To claim this, I am signing this object:

@andrewfulton
andrewfulton / gist:6546035
Last active December 22, 2015 23:19
Make the comicsworkbook.tumblr.com comics a little easier to read. Copy and paste the code below, create a new bookmark in your browser and paste this in as the URL
javascript:(function(){
$output = $('<div>');
$('.photoset_row a', $('iframe.photoset').contents()).each(function(){
$output.append( $('<img/>').attr('src', $(this).attr('href')));
});
$('section#main').replaceWith($output);
$('body').css({'margin': 0, 'width':'auto'});
})();
@andrewfulton
andrewfulton / minimalist_plus_disqus
Created December 13, 2011 12:13
Tumblr's minimalist theme WITH a disqus block
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!--
Theme: The Minimalist v1.
Design: The Minimalist (http://minimalist.co)
-->
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>author</key>
<string>Andrew Fulton</string>
<key>category</key>
<string>Format</string>
<key>command</key>
<string>#!/usr/bin/php