Skip to content

Instantly share code, notes, and snippets.

@ideadapt
ideadapt / aws-console-account-name-label.js
Last active July 2, 2024 11:52
AWS Management Console signed in account name label - Tampermonkey / Greasemonkey Userscript
// ==UserScript==
// @name AWS account name label in AWS Console
// @namespace userscripts
// @version 0.2
// @description Adds AWS account name label to navigation bar in AWS Console
// @author [email protected]
// @match https://*.console.aws.amazon.com/*
// @icon data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==
// @grant none
// ==/UserScript==
@ideadapt
ideadapt / css-js-morph-text-bits.html
Created January 13, 2023 19:18
Morph animation to blend / transform bit stream to characters using CSS, JavaScript and HTML
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
</head>
<body>
<style>
*,
@ideadapt
ideadapt / ubuntu-setup.md
Last active April 26, 2023 10:07
ubuntu setup

Tools

  • docker rootless mode
  • sdkman
  • nvm
  • ulauncher with fz
  • fusuma scratch pad gesture
  • intellij
  • visual studio code
  • signal
  • firefox
@ideadapt
ideadapt / web-servers.md
Created January 25, 2020 09:09 — forked from willurd/web-servers.md
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@ideadapt
ideadapt / watermark-images.sh
Created August 19, 2018 20:41
Watermarks all images selected in MacOS Finder application with a transparent logo overlay
#!/bin/bash
exec 2>&1
export PATH=/usr/local/bin:$PATH
for image in "$@"
do
if [ -s "$image" ]; then
filename=$(basename "$image")
dirname=$(dirname "$image")
mkdir -p "$dirname"/watermarked
@ideadapt
ideadapt / confluence-comment-navigator.js
Created May 14, 2018 14:01
Confluence Inline Comment Navigator via prev & next Links
// ==UserScript==
// @name Confluence Inline Comment Navigator
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Navigate through all open inline comments on a confluence page
// @author [email protected]
// @require https://cdnjs.cloudflare.com/ajax/libs/babel-standalone/6.18.2/babel.js
// @require https://cdnjs.cloudflare.com/ajax/libs/babel-polyfill/6.16.0/polyfill.js
// @include *://*/*confluence/display/*
// @include *://*/*confluence/display/*
@ideadapt
ideadapt / tampermonkey-bamboo-scripfile-link.js
Last active November 2, 2018 09:02
Bamboo Script File Repo Link - Tampermonkey
@ideadapt
ideadapt / await-all-subscriber-completion.js
Created June 20, 2016 20:10
Wait for all event subscribers to complete their event processing
"use strict"
var events = require("events")
var ev = new events.EventEmitter()
var log = console.log.bind(console)
process.on('unhandledRejection', function(reason, p) {
log(`Possibly Unhandled Rejection at: Promise ${p} reason: ${reason}`)
})
process.on('uncaughtException', function(err) {
log(`Caught exception: ${err}`)
@ideadapt
ideadapt / jasmine-done-callback-behaviour.js
Last active May 22, 2016 21:44
jasmine done callback behaviour
describe('experiments with done', ()=>{
describe('- correct usage -', ()=>{
it('should fail because of async expect failure, and failure is assigned to correct spec', (done)=>{
new Promise(function(res, rej){
setTimeout(res, 1000)
}).then(()=>{
expect(1).toEqual(11)
}).catch().then(done)
@ideadapt
ideadapt / advent-of-code-19-solution-es6.js
Last active April 13, 2016 15:23
ES6 based solution for Advent Of Code, Day 19
'use strict'
var fs = require('fs')
var inFile = '19.txt'
var content = fs.readFileSync(inFile, {encoding: 'UTF-8'})
var lines = content.split('\n')
var text = lines[lines.length -1]
var termLines = lines.slice(0,-1).filter(String)
var permutations = []