Skip to content

Instantly share code, notes, and snippets.

View creasty's full-sized avatar

Yuki Iwanaga creasty

View GitHub Profile
@creasty
creasty / README.md
Last active October 7, 2023 13:43
Stream custom messages as a video in Google Meet (or any web-based clients)

How to use

  1. Install User JavaScript and CSS extension
  2. Go to the extension options page:
  3. Click on 'Add new site':
  4. Enter name and domain:
  5. Copy & paste the script, and 'Save'
@creasty
creasty / circleci_workflow_visualize.rb
Created July 21, 2023 03:10
Visualize circleci.yml workflow in mermaid
require 'yaml'
CONFIG_FILE = ARGV[0]
config = YAML.load_file(CONFIG_FILE)
config['workflows'].each do |workflow_name, workflow|
next unless workflow.is_a?(Hash)
puts "### #{workflow_name}"
@creasty
creasty / finalize
Last active October 5, 2023 03:11
Merge two git repositories while perfectly preserving all commit histories
#!/usr/bin/env bash
set -euo pipefail
# shellcheck disable=1091
source "$(dirname "$0")/shared.sh"
# Funtions
#-----------------------------------------------
install_git_filter_repo() {
@creasty
creasty / README.md
Last active August 17, 2022 11:46
Google Meet Automation (using 'User JavaScript and CSS')

What does it do?

The script automates the following actions.

  1. Mute the camera
  2. Mute the mic — Opted-out by default
  3. Join the meeting
  4. If the meeting title matches a certain pattern, remind you to start recording by opening 'Activities Panel'.
    Activities Panel
@creasty
creasty / Dockerfile
Created March 18, 2022 03:34
Convert MS Office documents to PDF
FROM ubuntu:16.04
RUN set -ex \
&& apt-get update \
&& apt-get install -y locales \
&& locale-gen en_US.UTF-8 \
&& update-locale LANG=en_US.UTF-8 \
&& apt-get clean \
&& rm -rf /var/cache/apt/archives/* /var/lib/apt/lists/*
ENV LC_ALL C
import javax.crypto.Mac
import javax.crypto.spec.SecretKeySpec
import kotlin.experimental.and
import kotlin.experimental.or
fun hmacSha256(data: String, key: String): ByteArray {
val algorithm = "HmacSHA256"
val secretKeySpec = SecretKeySpec(key.toByteArray(), algorithm)
val mac = Mac.getInstance(algorithm)
mac.init(secretKeySpec)
@creasty
creasty / jobcan_populator.js
Last active October 5, 2023 03:12
Jobcan で埋まっていないところを勝手に埋めてくれるくん
document.querySelectorAll('tr[id^=tr_line_of_]').forEach(el => {
const start = el.querySelector('input[name^=start]');
const end = el.querySelector('input[name^=end]');
const button = el.querySelector('.btn');
const holiday = el.querySelector('#uneditable_holiday');
if (!!start.value && !!end.value) {
return;
}
if (holiday.innerText.match(/休/)) {
import Foundation
public struct Swizzle {
private init() {}
public static func classMethod(_ cls: AnyClass, to: Selector, from: Selector) {
let cls: AnyClass = object_getClass(cls)!
let toMethod = class_getInstanceMethod(cls, to)
let fromMethod = class_getInstanceMethod(cls, from)
@creasty
creasty / post.md
Last active October 7, 2023 16:42
Cultures behind product development at Wantedly

What is Wantedly?

5

Wantedly is a Tokyo-based startup, founded in 2010 helps you discover jobs that ignite your passion. Our mission is to ’create a world where work drives passion.’

Wantedly aims to create a world where people can experience personal growth and development and contribute to society through their challenges of work.

Because your work takes up such a great portion of your life, we believe it must be exciting and worthwhile.

@creasty
creasty / Slack theme
Last active February 28, 2023 08:16
#1a1a1a,#444444,#8397a9,#39444d,#303030,#a8a8a8,#a3a46f,#af7070