Skip to content

Instantly share code, notes, and snippets.

0.0.0.0 bestrecipes.com.au
0.0.0.0 hipages.com.au
0.0.0.0 odds.com.au
0.0.0.0 onebigswitch.com.au
0.0.0.0 suddenly.com.au
0.0.0.0 supercoach.com.au
0.0.0.0 punters.com.au
0.0.0.0 skyweather.com.au
0.0.0.0 skynews.com.au
0.0.0.0 australiannewschannel
@matmunn
matmunn / README.md
Last active February 17, 2022 01:22
Cognito ID Token Fetcher

Cognito ID Token Fetcher

This is a deno helper script that can fetch a user's ID Token used for accessing resources protected by AWS Cognito.

To run:

deno run --unstable --allow-env --allow-read --allow-net https://gist.githubusercontent.com/matmunn/c64a43dd10bc29c2f8dffa67a7f8b91f/raw/0e766f98fe05c656e3661c28929142abb96f25f7/cognito-helper.ts <aws_region> <aws_cognito_client_id>

and can be supplied as environmental variables - AWS_REGION and AWS_COGNITO_CLIENT_ID respectively.

@matmunn
matmunn / App.tsx
Created May 9, 2020 03:25
Table component
import React from 'react'
import Table from './Table'
const App: React.FC = () => {
return (
<div>
<Table
headings={{
name: 'NaMe',
@matmunn
matmunn / demo.py
Created May 6, 2019 08:43
Python demo
class Person:
def __init__(self, name, age):
self.name = name
self.age = age
def say_hello(self):
"""Say hello to the user."""
print(f"Hello, {self.name}.")
@matmunn
matmunn / remove_gmail_ads.js
Last active March 2, 2019 04:08
Userscripts
// ==UserScript==
// @name Hide Gmail Ads
// @namespace https://matmunn.me/
// @version 0.1
// @description Hide the ads in Gmail
// @author Mat Munn <mat@matmunn.me>
// @match https://mail.google.com/mail/*
// @grant GM_addStyle
// ==/UserScript==
{
"parserOptions": {
"ecmaVersion": 6,
"sourceType": "module",
"ecmaFeatures": {
"jsx": true,
},
},
"env": {
"browser": true,
module.exports = {
"env": {
"browser": true,
"node": true,
"es6": true,
"jest": true,
"react-native/react-native": true,
},
"extends": [
"eslint:recommended",
{
"parserOptions": {
"ecmaVersion": 6,
"sourceType": "module",
"ecmaFeatures": {
"jsx": true,
},
},
"env": {
"browser": true,
#!/usr/local/bin/python
import os
import plivo
import sys
from time import strftime
if not os.path.isdir(PATH):
sys.exit()
@matmunn
matmunn / change_sound.sh
Last active June 10, 2016 02:08
Script to toggle sound output devices
#!/usr/bin/bash
OUTPUTDEV=`cat ~/.bin/sound_device`
INPUTS=($(pacmd list-sink-inputs | grep index | awk '{print $2}'))
if [ $OUTPUTDEV = "Speakers" ]
then
# Persist the changes in our file
OUTPUTDEV="Headset"
echo $OUTPUTDEV > ~/.bin/sound_device